Jump to content

Play Two Sound File in a Loop


WarriorRaj
 Share

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

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

Recommended Posts

Hello!

 

Just working on playing two sound file in a loop. There is some blank period when i play the sound in loop i.e. after second sound is over there is blank for few second before first sound file play again, pls. guide me how to slove it.

 

default{state_entry(){llPreloadSound("SoundName1")//This loads the sounds into all in range viewers and cuts delay between sounds.llPreloadSound("SoundName2")//All sound parameters can be the name of a sound in the prim's inventory or a UUID of a sound");
        llSetTimerEvent
}timer(){llSetSoundQueueing(TRUE)//Set to TRUE for queueing and SoundName2 plays after the SoundName1 has ended.//Set to FALSE only the second will be played since the prim has only one sound emmiter and the second was called last.//Can be set anywhere withing the script (if within an event it will activate when the event is triggered.llPlaySound("SoundName1"1.0)llPlaySound("SoundName2"1.0)}}
Link to comment
Share on other sites

Without the timing information it's hard to get very specific, but a couple of observations.

First llPreloadSound() in state-entry() doesn't cause those sounds to be preloaded for new arrivals; somebody comes on the scene long after the script is reset and they'll only encounter the sound files as they're played. This is not the problem you're experiencing now, but it may figure in to how you want to solve it. (Incidentally, state_entry is a good place to put llSetSoundQueueing because you only really need to set it once for the life of the script.)

Second, and what I suspect is going wrong here, is that the timer interval isn't exactly the sum of the sound durations.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1665 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...