$nav ===== Function: llPreloadSound ===== llPreloadSound(string sound) Preload a $lart[sound]. The idea of preloading a sound is to transmit the sound in advance, so that when the time to play it comes, it is already cached by the surrounding avatars' viewers, and plays without delay. $delay[1.0] ===== Parameters ===== === sound === Sound name or $lart[UUID] of the sound clip to preload. ===== Notes ===== * If used in a $lart[HUD], the preload is only effective for the owner. * Sounds are usually deleted from the cache when relogging. * If the sound is a $lart[UUID], it doesn't need to be present in the prim. * If the name of a sound present in the prim's inventory matches the $art[UUID] of a different sound, the sound that will be preloaded is the one in the item, not the $art[UUID]. * If the name is not a $art[UUID], and it is not present in the prim's inventory, or if an item with that name which is not a sound exists in the prim's inventory, an error will be privately said (20m range) to the owner in $lct[DEBUG_CHANNEL]. ===== Short examples ===== llPreloadSound("My Sound"); // Preloads the sound "My Sound" (the clip must exist in the prim) ===== Complete examples ===== default { on_rez(integer param) { // Preload a bubbling sound when this object is rezzed. llPreloadSound("00000000-0000-0000-0000-000000000115"); } touch_start(integer count) { // When touched, the sound will immediately be ready to play if the avatar // was present when the object was rezzed. llPlaySound("00000000-0000-0000-0000-000000000115", 1.0); } } ===== See also ===== * $lfn[llStopSound] stops a sound playing in this prim. * $lfn[llLoopSound] plays a looped sound in this prim. * $lfn[llLoopSoundMaster] plays a looped sound letting others synchronize with it. * $lfn[llLoopSoundSlave] plays a looped sound synchronized with a master. * $lfn[llPlaySound] plays a sound once in this prim. * $lfn[llPlaySoundSlave] plays a sound synchronized with a master. * $lfn[llAdjustSoundVolume] adjusts the volume of a sound playing in this prim. * $lfn[llSetSoundRadius] adjusts how far the prim sounds can be heard. * $lfn[llSetSoundQueueing] adjusts whether sounds are enqueued in this prim. * $lfn[llTriggerSound] "drops" a sound where the prim is. * $lfn[llTriggerSoundLimited] "drops" a sound where the prim is, with limited reach. * $fn[llPreloadSound] causes a sound to be preloaded, for faster playing. * $lfn[llSound] plays a sound in this prim (deprecated - use $lfn[llPlaySound] instead). * $lfn[llSoundPreload] causes a sound to be preloaded (deprecated - use $lfn[llPreloadSound] instead). * $lart[Sound] (general information)