Re: Volume confusion

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

 



jon wrote:
> Is the min value supposed to be negative or is the most common code
> everyone is using broken ?

>     snd_mixer_selem_get_playback_volume_range(elem, &min, &max);
>     newvol= ( (long)volume * (long)max ) / (long)100 ;
>     if ( snd_mixer_selem_set_playback_volume_all(elem,newvol) <0)

Ignoring the min value is, of course, wrong.

"Math is hard, let's go shopping!"
File a bug and suggest to go shopping here:
<http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsamixer/volume_mapping.c;hb=HEAD>


Regards,
Clemens

------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user




[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux