Jump to content

Is sound queuing broken? It repeats the last sound... repeatedly


Rick Nightingale
 Share

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

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

Recommended Posts

I've used a script for ages that simply plays assorted sound bites when I click buttons. It uses sound queueing because some of them are >10s long, to get them played in sequence, and so I can play more than one without waiting to press the button. Simple, right? Of course not, this is SL.

There is only one llPlaySound() in the script, and I have an llOwnerSay() telling me what it plays when it's called.

As soon as I have a queued sound, the last queued and played sound will often be repeated, especially if I subsequently teleport. Even though it has already played, finished, and no other llPlaySound() has been executed. Sometimes it will be repeated two to four times. Every time I TP, it starts repeating again. Sometimes playing a short silence sound that I use (for going between deliberately repeated sound bites when I press its button twice, since that won't queue) will stop the unwanted repeating. Thinking about it, for all I know that silence is then being repeated! Probably is.

As I type this, I haven't played the 'stop' silence and the last sound bite is still repeated every time I TP after 20 minutes and ten TPs! TP doesn't even have to be out of the region, from tests I've just done. Repeats seem to come randomly timed; they can be a full minute after the last time.

I'll reiterate: Only one instance of the (final) sound is played/queued with one call to llPlaySound(). It only exists in one place in the script and my llOwnerSay() tells me when it is called so I know the script is working correctly. It's hardly complicated. I've tried disabled and re-enabling sound queueing after the last sound is played; it made no difference.

If I detach the worn object that plays the sounds, the repeating stops. Resetting the script does not stop it. Other avatars can hear the sound repeated too (at least, another viewer instance with an alt logged on can). It happens in Firestorm and LL's viewer just the same.

Thoughts, advice... ?

(Not sure if this is a scripting thing or a viewer thing, really, but I'll start here).

Edited by Rick Daylight
Link to comment
Share on other sites

A 2022 note from Jenna Huntsman in the wiki page for llPlaySound reminds scripters:

  • When used in conjunction with llSetSoundQueueing, sounds may incorrectly play more than once. This can be fixed by disabling the sound queue if only a single sound sample is to be played.

Strangely, the link on that note points to a forum post that you created yourself, back in 2019:

It looks like you've just resurrected your own question. Since there were no answers to the earlier question, I'm guessing that your best move now would be to submit a BUG JIRA and see if you can get LL interested.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Sound queuing does indeed have a lot of issues, I wouldn't be surprised if this is another. This may or may not be tangentially related to the fact that queueung can occasionally cause llLoopSound() to loop the wrong sound (when different sounds are being played/looped in a relatively (5 seconds?) short time).

  • Like 1
Link to comment
Share on other sites

I have also found random extra repeats of non-loop sounds from llPlaySound. To fix it I call llStopSound once I know the sound is finished, and that seems to do the trick.

I have also gone crazy from hearing 2 repeats of all sounds. Then I realised I had an alt online for testing, and I was just getting 2 of everything through the speakers :D, just not necessarily in sync with each other.

  • Haha 1
Link to comment
Share on other sites

13 hours ago, Wulfie Reanimator said:

If it's any help, the current limit for sound assets is 30 seconds.

I can't upload anything longer than 10s. I just tried with a 14s clip and got the message "Sample too long". Crop it to 9.9s and it uploads.

Do you know something I don't - any way to get a 30s clip uploaded?

I've checked here: https://wiki.secondlife.com/wiki/Limits#Sound and it does say 30s, although the 'uploading assets' guide still says <10s.

Link to comment
Share on other sites

19 minutes ago, Rick Daylight said:

I can't upload anything longer than 10s. I just tried with a 14s clip and got the message "Sample too long". Crop it to 9.9s and it uploads.

Do you know something I don't - any way to get a 30s clip uploaded?

I've checked here: https://wiki.secondlife.com/wiki/Limits#Sound and it does say 30s, although the 'uploading assets' guide still says <10s.

Here's the previous thread @Love Zhaoying is thinking about, I was the one who updated the wiki after uploading a 30 second clip myself. (Firestorm also tells you the maximum duration is 30 seconds if you try to upload anything longer.)

https://community.secondlife.com/forums/topic/324324-how-to-split-a-wav-using-audacity/#comment-2513901

Would you be willing to share the audio file you're trying to upload? I could try and figure out what's wrong with it.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Sure - I'll PM you a link.

The 14.5s clip is exported from Audacity as standard WAV format PCM, 16-bit signed, 44.1kHz sample rate. I've tried uploading (with Firestorm) the stereo version since the SL doc says it will be converted, and the downmixed in Audacity single channel version. Neither will upload ("sample too long"). The single channel file size is exactly as expected for the duration at those specs.

Link to comment
Share on other sites

1 hour ago, Rick Daylight said:

Sure - I'll PM you a link.

The 14.5s clip is exported from Audacity as standard WAV format PCM, 16-bit signed, 44.1kHz sample rate. I've tried uploading (with Firestorm) the stereo version since the SL doc says it will be converted, and the downmixed in Audacity single channel version. Neither will upload ("sample too long"). The single channel file size is exactly as expected for the duration at those specs.

Hmm... everything about the file looks correct, FFMPEG confirms it has the correct encoding (pcm_s16le, 44100 Hz, mono) but I'm getting the same error even after re-encoding it:

"Unable to upload file due to the following reason: Sample too long. Please try again later."

I dug up the file I uploaded in that previous thread, which is now getting the same error (although the file is untouched). Trying to find out which account/grid I uploaded it on, now...

Edited by Wulfie Reanimator
  • Like 2
Link to comment
Share on other sites

2 hours ago, Rick Daylight said:

I get the feeling that your uploaded 30s sound clip is going to be the equivalent of a megaprim.

I hope not! The previous thread was not the first time people have uploaded 30 second sound clips, and you can see the error dialog still spells out the limit. (When I try to upload a 35 second sound.)

image.png.01db9d2136f32a0f9e89e50acbbd3c80.png

Edited by Wulfie Reanimator
Link to comment
Share on other sites

3 hours ago, Wulfie Reanimator said:

It's hard to tell, the upload errors don't seem to come from the viewer itself, but as a response from LL's servers. This makes it almost impossible to know the cause and I'm not sure which Linden to ask about the audio format specifications.

Nothing in the viewer logs?

Link to comment
Share on other sites

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