Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
|
11-21-2009 02:13
I'm adding sound to a wave, and I'm creating sounds files from WEB sources, editing them with Audacity. I have the hiss of the wave, which I want to call from llLoopSound. To prevent a click when the sound repeats, I rapidly faded the signal to zero at both ends when making the wav file. The short section of silence is not noticeable when playing looped. But when I start to play it, there is sometimes a BANG at the start like a gunshot. I suppose that rapid fade-in from silence to a white noise looks like an impulsive sound. What should I do to prevent this? Start the sound with zero volume, set a timer and adjust the volume up after the bang is over? Then I have the explosive sound of a wave breaking. I call this with llPlaySound (in a different primitive, of course). Sometimes it works OK, but other times there is just a few seconds of silence instead of the noise I want. I stand on one side of the wave and it sounds good, on the other side and silence. What gives? How can I make my sound play reliably?
|
Zena Juran
Registered User
Join date: 21 Jul 2007
Posts: 473
|
11-21-2009 16:22
If the "bang" is indeed just rapid volume increase, you can lengthen the time it takes to go full volume depending on your total time for the wav. I would double-check the waveform just to make sure that somewhere in the process Audacity didn't add something it shouldn't have (I've had clicks added for mysterious reasons in Audition). Sounds need to be loaded into you viewer cache before you can hear them. Depending on what other stuff your viewer is processing, is when you will hear your sound... this goes for llLoopSound and llPlaySound. By the time you hear the sound in llLoopSound, it's already loaded into your viewer. There is a llPreloadSound but it doesn't work...period! There is no reliability in playing sounds in SL. A trick is to set an empty prim to loop a copy of your llPlaySound wave at 0.0 volume so that when it is triggered in the other prim, an avatar's viewer might have already cached it. Good luck! 
|