When we get a notification that an element has been removed, we have to
recreate our internal control representation to avoid accessing freed
memory. (And the checking for SND_CTL_EVENT_MASK_REMOVE should actually
be done correctly while we're at it.)
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>
For controls with a big range, stepping through all values can become
tedious and make it impossible to adjust the volume easily. Therefore,
ensure that all steps are big enough so that the full range has at most
one hundred steps.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
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>