WarriorRaj Posted October 2, 2019 Share Posted October 2, 2019 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 More sharing options...
Qie Niangao Posted October 2, 2019 Share Posted October 2, 2019 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 More sharing options...
Xiija Posted October 3, 2019 Share Posted October 3, 2019 (edited) You could cheat a bit.... llSound("SoundName1",1.0,TRUE,TRUE); llLoopSound("SoundName2", 1.0); Edited October 3, 2019 by Xiija Link to comment Share on other sites More sharing options...
Recommended Posts
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