Jessica Qin
Wo & Shade, Importers
Join date: 16 Feb 2005
Posts: 161
|
11-29-2005 17:02
So what does llPreloadSound() really do under the covers? I know it's supposed to preload a sound clip file -- but preload it *where*? Into all of the 'local' client AVs? Into the Sim cache? When happens when client AVs move into range? Or the object itself moves around? What if I put the following code into a prim and wear the prim as an attachment default { state_entry() { llPreloadSound("mySound"); }
touch_start(integer total_number) { llPlaySound("mySound", 1.0); } }
and then I walk up to you from 200m away -- does mySound automagically load into your AV's client? Or is llPreloadSound() pretty much worthless as coded here? Jess
|
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
|
11-29-2005 17:06
I believe - and this isn't solid experimentation backed by debug info, just from long use - I think llPreload just forces the sound to be downloaded to each client that would be in normal "hearing range" of the sound... basically, the same thing that happens when you use PlaySound, just without the actual playing of sound.
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?” Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
|
Jessica Qin
Wo & Shade, Importers
Join date: 16 Feb 2005
Posts: 161
|
11-29-2005 17:22
From: Aliasi Stonebender I believe - and this isn't solid experimentation backed by debug info, just from long use - I think llPreload just forces the sound to be downloaded to each client that would be in normal "hearing range" of the sound... basically, the same thing that happens when you use PlaySound, just without the actual playing of sound. I'll buy that -- but when does this happen? In the code example above, would the preload only happen to clients that are around when state_entry() happens? Or -- does the attachment 'wear' the sound like it was a texture? Which, if I understand how SL works (hardly a sure bet) would cause approaching AV clients to preload the sound when they come into range? Jess
|
Aliasi Stonebender
Return of Catbread
Join date: 30 Jan 2005
Posts: 1,858
|
11-29-2005 17:30
From: Jessica Qin I'll buy that -- but when does this happen? In the code example above, would the preload only happen to clients that are around when state_entry() happens? Or -- does the attachment 'wear' the sound like it was a texture? Which, if I understand how SL works (hardly a sure bet) would cause approaching AV clients to preload the sound when they come into range?
Jess I believe, again, it works exactly like llPlaySound in this regard; only those around when the function is executed load the sound. That said, sounds carry quite a distance in SL, so I would not be at all surprised if it caused every agent in the sim to load the sound, but I'll have to experiment to try and see if this is true.
_____________________
Red Mary says, softly, “How a man grows aggressive when his enemy displays propriety. He thinks: I will use this good behavior to enforce my advantage over her. Is it any wonder people hold good behavior in such disregard?” Anything Surplus Home to the "Nuke the Crap Out of..." series of games and other stuff
|