[sldev] How to solve this bug?

Robert Martin robertltux at gmail.com
Tue Aug 4 08:33:21 PDT 2009


On Tue, Aug 4, 2009 at 9:33 AM, Sheet Spotter<sheet.spotter at gmail.com> wrote:
>
> There may be two issues to consider before revising the implementation for
> sound.
>
> Firstly, stopping sound sources might have an undesirable side effect when
> moving your camera. In the worst case, moving your camera in and out might
> make the scene sound like rap music, constantly stopping and restarting the
> sound. Playing the sound with a gain of zero ensures that sounds continue to
> play while the camera is out of range.
>
> Secondly, the llPreloadSound scripting function is used to ensure that any
> clients within range have performed any necessary setup and initialization
> that allows the sound to be triggered later without delay. This operation
> might rely on playing the sound with zero gain.
>
> Do these issues constitute two requirements that any revised implementation
> should satisfy?
> 1. Sounds that fall out of range should continue playing (i.e., not restart
> when they fall back into range).
> 2. Sounds sent to the viewer by llPreloadSound should be triggered without
> delay.
>
>
> Sheet Spotter
>
> -----Original Message-----
> From: sldev-bounces at lists.secondlife.com
> [mailto:sldev-bounces at lists.secondlife.com] On Behalf Of Tofu Linden
> Sent: August 4, 2009 5:13 AM
> To: Second Life Developer Mailing List
> Subject: Re: [sldev] How to solve this bug?
>
> Aleric Inglewood wrote:
>> I'd be happy, now that I know that mixing channels with a gain
>> of 0 cost much more cpu, to fix and close this bug by stopping sound
>> sources instead of setting their gain to 0.
>
> That definitely seems like the right direction - thanks!
>
>
>
> _______________________________________________
> Policies and (un)subscribe information available here:
> http://wiki.secondlife.com/wiki/SLDev
> Please read the policies before posting to keep unmoderated posting privileges
>

two somewhat goofy ways to fix this

1 instead of dropping the gain to full zero drop it down to minimum to
prevent triggering the Zero Gain Bug (play the sound at like 0.01% or
whatever the lowest possible gain is)*

2 have a timeout so that if you run back into range within say 20
seconds it will continue to play but if you are out of range at 21
seconds then the stream is cut

*note if implemented the comments should have **please remove when lib
bug is fixed ref jira VWR-14914** or something similar

-- 
Robert L Martin


More information about the SLDev mailing list