Jump to content

llPreloadSound, llPlaySound issues


Deep Semaphore
 Share

You are about to reply to a thread that has been inactive for 4740 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello,

I made a 3D board game but while making it I came across one annoying issue when implementing the sounds. I find that even sounds are preloaded, the first time they are played often they do not play. To fix this issue, I first forced a sound play for all sounds involved in the game so that when they are really required they would work fine. Has anyone else come across this? Let me how to fix this ... I remember this behavior since a few years back ... but this is still there.

btw this is the game am working on.

Link to comment
Share on other sites

When you preload sounds, you are preloading them to any avatars within hearing range.  That's what "preloading" means. If the script preloaded a sound and you were not within range at the time, it didn't preload for you.  Your workaround is perfectly good one.  If sounds are played in sequence, you could also preload one while the previous one is playing.  Or you could preload sounds periodically with a timer, on the theory that you never know when a new person might have walked up since the last time the file was preloaded.

Link to comment
Share on other sites

unfotunately Rolig has it, and your work around is pretty much the deFacto standard for doing things.

there is one additional method that I've used in a few products... and that is to loop the sound at zero volume for a single sound that needs to be preloaded in a hurry as soon as objects come into range. it's only good for a single sound, but I've used it to great effect in weapon sounds (nothing more annoying than being shot 5 times before you hear the bang)

ETA:
btw, looks good, I like the use of space in it... too many games i SL think flat.

Link to comment
Share on other sites

An interesting change was just made in the development viewers that solves this problem for gestures. It now checks that the assets are in the cache before playback starts, so that they will work right on the first try, but possibly with a delay. The million L$ question: would a viewer change like this help or hurt more if it could be applied to scripted sounds? First I thought "duh yeah", objects should do that too, but would the possble delayed trigger hurt some games or immersion?

Link to comment
Share on other sites

I can easily imagine times when it wopuld be inconvenient to have a sound delayed for some people in an area but not others, so a delay might be problematic sometimes.  Still, the idea of automatically precacheing is interesting.  Perhaps if it were an optional flag .....  llPlaySound(string filename, float sound_volume, integer preload);  ?

 

Link to comment
Share on other sites

that'd be good, if they just tweaked the behavior of llPreloadSound, so that it flagged sounds for preloading... then whenever the viewer saw the flag it could start grabbing the labeled sounds.... it'd definitely need to be optional and default off when sound is muted/disabled on the viewer, perhaps with it's own checkbox to enable/disable in case of problems.

I don't see loading every sound in every object as being good though, since it could easily be used to spike peoples bandwidth. even with just flagging sounds by preload that might be possible, so some throttles might be necessary.

but otherwise I think it'd be a great addition.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4740 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...