Commit graph

8 commits

Author SHA1 Message Date
Takashi Iwai
3bea722b3b alsamixer: Fix 64bit issues
lrint() returns a long int.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-06-03 14:28:28 +02:00
Clemens Ladisch
34bb514b5f alsamixer: use cubic scale for volume bars
Instead of mapping the raw volume values linearly to the screen, use
a mapping where the bar height is proportional to the audible volume,
i.e., where the amplitude is the cube of the bar height.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-12-06 14:07:48 +01:00
Clemens Ladisch
c9b86f49a8 alsamixer: handle out-of-range volume values
Ensure that control volume values are in their allowed range; otherwise,
the displayed values could be outside the range 0..100 and mess up the
layout.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-02-22 09:42:03 +01:00
Clemens Ladisch
5a016b583b alsamixer: fix division by zero
The attempt to divide by max-min fails if a control has only one valid
value.  In this case, adjust the maximum so that the computation can
succeed; the control will look like 0%.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2010-02-19 17:07:20 +01:00
Clemens Ladisch
077467a87e alsamixer: fix display of inactive volume bar
Fix the volume bar color selection logic so that the current attribute
is used for inactive controls.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-19 08:40:00 +02:00
Clemens Ladisch
7a3e59cbc5 alsamixer: rename attr to ch
Rename the attr variable because it contains not only the character's
attributes but also the character itself.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-06-19 08:39:24 +02:00
Takashi Iwai
29a7dbc552 alsamixer - Tricolorize volume bars
A little of bit of Italian taste was missing...

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-06-18 14:42:28 +02:00
Clemens Ladisch
5b6b5fd14b alsamixer: show channel names for multichannel controls
For multichannel mixer controls, add the channel name to each screen
control.

Also make some other small changes.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
2009-05-25 10:26:22 +02:00