Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Looping sounds issue

Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
09-20-2006 05:28
I was just curious as I've noticed this for awhile now and haven't seen anything official concerning this issue, but has anyone had problems using llPlaySound() lately?

In my main ship script I have several events that trigger the script to play different sounds while another prim with another script runs the looped running sound.

Certain events have no problem playing the correct sound and then stopping...such as the powerup sound. But it seems like most other instances of llPlaySound() causes the sound playback to go into a random loop where at any moment I'll hear the last sound the ship played, and then might not hear anything for a minute or two and then hear the sound again.

I've triple checked my scripting and I know it doesn't have some random instance that could cause it to play these sounds as it's several different sounds and they are only called for one event each.

So I know the ship can't actually be playing the sound since there's nothing in the script to tell it to when it does, but yet I keep hearing it, which leads me to wonder if I've just overlooked this as a known issue or not.

I actually get to the point sometimes where I just delete all the llPlaySound files out of which ever ship I'm flying and fly with only the running sound so I don't get stuck in one of these broken-record loops.
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
09-20-2006 06:28
I encountered this recently as well with llPlaySound a month or so back with the reload sound on my .45 Shansi. I never quite got to the bottom of it. When I was having the trouble, it seemed to be related to state changes and going in and out of mouselook.

In the end it got so frustrating trying to isolate the bug to report it that I just used llTriggerSound and split the sound concerned into chunks, to be played at different times.
Bosozoku Kato
insurrectionist midget
Join date: 16 Jun 2003
Posts: 452
09-20-2006 14:00
llTriggerSoundLimited() > llPlaySound().. try that.
Use the loop (eg: ship engine running) for the continuous sound, but use llTriggerSoundLimited() to play just about everything else.

TSL sounds play independantly of all other sounds, and thus might help avoid the problem your having. Another benefit is this function also helps control noise pollution (well long as you set decent limits). The downfall is sounds play at the position fired, and don't follow the source. So if in a fast moving object, that you're riding on, you might experience some fading/doppler affects.
_____________________
float llGetAFreakingRealTimeStampSince00:00:00Jan11970();
Tiarnalalon Sismondi
Registered User
Join date: 1 Jun 2006
Posts: 402
09-20-2006 15:35
Well I attempted using llTriggerSound, but due to the issue that you mentioned...you end up only hearing a split second of it (my ships move pretty fast in mouselook)