Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

sound timing

InuYasha Meiji
Half Demon
Join date: 14 Mar 2005
Posts: 127
02-17-2006 19:50
I have a project where I'm atempting to get an animation and a sound to run together in unison. If I play the sound and start the animation together, the first time around the animation is about half way through, before the sound actually starts to play. The next time I play the two they run fine and at the same time as it should.


I attempted to preload the sound, but it still acted the same way. Can anyone tell me if I could get them timed together even on the first try. Like maybe some way to detect if the sound is actually playing before going on to the next step or something..

Help is appreciated..
-InUyasha
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
02-17-2006 19:54
Unfortunately, there is little you can do to ensure synchronization. llPreloadSound() is only a suggestion to the client that it should ask for the sound and sounds appear to be given considerably lower priority than most other requests.

This was the case back in version 1.2, and if anything has only worsened since. There is simply no programatic way you can tell if a sound is actually playable by the client.
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-17-2006 20:06
Can you play a sound with a volume of 0? Would it force the client to load the sound sooner than llPreloadSound if you can?
InuYasha Meiji
Half Demon
Join date: 14 Mar 2005
Posts: 127
Thanks
02-18-2006 05:34
From: Introvert Petunia
Unfortunately, there is little you can do to ensure synchronization. llPreloadSound() is only a suggestion to the client that it should ask for the sound and sounds appear to be given considerably lower priority than most other requests.

This was the case back in version 1.2, and if anything has only worsened since. There is simply no programatic way you can tell if a sound is actually playable by the client.


Thanks for letting me know, I spent hours searching before I resorted to posting. At least I know now. Thanks for taking time to answer.

-Inu
InuYasha Meiji
Half Demon
Join date: 14 Mar 2005
Posts: 127
It an Idea.
02-18-2006 05:36
From: AJ DaSilva
Can you play a sound with a volume of 0? Would it force the client to load the sound sooner than llPreloadSound if you can?


I might give it a try, althought since I still have no way of telling if the sound is actually loaded and played before I start my aniamtion, it still wouldn't help me much. But thanks for taking the time to answer me.

-Inu
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
02-18-2006 05:37
From: AJ DaSilva
Can you play a sound with a volume of 0? Would it force the client to load the sound sooner than llPreloadSound if you can?
Probably no more effectively than llPreloadSound() does.

I base this guess on the delay that you will sometimes get between log-in and UI sounds playing.
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-18-2006 05:46
From: Introvert Petunia
Probably no more effectively than llPreloadSound() does.

I base this guess on the delay that you will sometimes get between log-in and UI sounds playing.
I'm not sure if that's relevant though. Those sounds are stored locally aren't they?
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
02-18-2006 05:52
From: AJ DaSilva
I'm not sure if that's relevant though. Those sounds are stored locally aren't they?
Only in the sense that they are drawn from the cache and are *supposed* to likely be there already. But as many other threads have noted, the cache has been acting quite borked since 1.7 or so. There are no static (loaded with the client installation) sounds or textures.

You can see the same effect with collision particles and "bonk" sounds.
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
02-18-2006 05:55
From: Introvert Petunia
Only in the sense that they are drawn from the cache and are *supposed* to likely be there already. But as many other threads have noted, the cache has been acting quite borked since 1.7 or so. There are no static (loaded with the client installation) sounds or textures.

You can see the same effect with collision particles and "bonk" sounds.
I see. Probably been said before, but it does seem odd that what are essentially system files aren't included as part of the installation.
Introvert Petunia
over 2 billion posts
Join date: 11 Sep 2004
Posts: 2,065
02-18-2006 05:58
Yes, it has been said before. My guess is that this was originally done for total symmetry in all assets which was fine when the asset server wasn't extremely over-taxed and the if the local cache were properly implementing a Most Recently Used storage scheme that worked.

Wow, this is sorta like chat, only a little slower. ;)