Re: Re: Minor bug: setvolume > 65535 - wierd stuff happens..

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Wed, 26 Sep 2001, Stephen Davies wrote:

> It's got to do with this code in msp3400.c for VIDIOCGAUDIO:
> 
> 
>     va->volume=MAX(msp->left,msp->right);		// =0
>     va->balance=(32768*MIN(msp->left,msp->right))/
>                 (va->volume ? va->volume : 1);		// =0
>     va->balance=(msp->left<msp->right)?
>                 (65535-va->balance) : va->balance;	// =0
> 
> I suppose the best fix is to remember the balance as set - but an OK fix
> could be just to insert:
> 
>     va->volume=MAX(msp->left,msp->right);               // =0
>     if (va->volume == 0)
> 	va->balance = 32768;
>     else {
> 	va->balance=(32768*MIN(msp->left,msp->right)) /
>                 (va->volume ? va->volume : 1);          // =32768
>         va->balance=(msp->left<msp->right)?
>                 (65535-va->balance) : va->balance;      // =32768
>     }
> 


What do you say to this change?  Do you want a patch?

Steve






[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux