On Wed, 28 May 2003, Eliot Blennerhassett wrote:

> On 28 May 2003 at 9:25, Jaroslav Kysela wrote:
> 
> > On Tue, 27 May 2003, Eliot Blennerhassett wrote:
> > 
> > > this patch enables alsamixer to adjust controls correctly where the min
> value is
> > > negative (non-zero?)
> > > 
> > > I have tested with my controls that have ranges of -100,0 and -10,22 and it
> > > seems to work OK.
> > 
> > It seems that only removal of condition 'if volume >= 0' is sufficient.
> Jaroslav,
> 
> I think the other change is necessary too.
> 
> Mixer conv returns a value between min and max.  Input vol1 is the percentage
> step.  In existing code returned vol1 is assumed to be that step converted into
> the units of the control.  When min is non-zero this is not true.\
> For example mixer_conv(2,0,100,-100,0) returns -98
> Subtracting min==-100 gives the correct result of (-98 -(-100))=+2
> I suspect that every control except mine has min==0
>  
>        vol1 = mixer_conv(vol1, 0, 100, min, max);
> +    vol1 -= min; // convert value to a delta in units of the volume control.
>       if (vol1 <= 0)

Yes, you're right. Fixed in CVS.

                                                Jaroslav

-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to