Alternative volume-level algorithm



I use moc, with software mixer to control the volume (I'm not sure if that is relevant information or not).

I think that the effect of the volume control is too weak and an alternative volume-level algorithm would be good to have.
If I compare moc with audacious, audacious uses a (in my opinion) much better algorithm for controlling the volume. I'm no expert on the subject but I guess it could be a issue of linear scale versus logarithmic.

I've been doing some work in this area - namely I used alsamixer algorithm which allows for a logarithmic volume setting. If you want to play with it, you can grab it from my github fork: . It's in commit: but I'm not sure if it would work with current SVN head on its own.

Just realized my thing works only for ALSA mixer. I'll try to copy it over to softmixer as well and let you know.

Pushed new commit which makes softmixer behave non-linearly. Used the functions from

The code should work also with current MOC version, you can grab patch here (don't worry about reported offsets).


Will the work done by tomaszg be included into MOC?
I think it would be a really nice improvement on the music player.

Significant work on the sound drivers is scheduled to happen in MOC version 2.7 (when we get there), so that's the time to be looking at it.