Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume getter and setter behave inconsistently #22

Open
wiertz opened this issue Jan 1, 2020 · 3 comments
Open

Volume getter and setter behave inconsistently #22

wiertz opened this issue Jan 1, 2020 · 3 comments

Comments

@wiertz
Copy link

wiertz commented Jan 1, 2020

I am using mopidy as a backend to a music box project written in node js.

Problem: When using the alsamixer plugin, getting and setting volume behaves inconsistently: e.g. if I set the volume to a value of 50, I get a value of 49 on a subsequent check. This only happens with alsamixer, not with mopidy softwaremixer.

Expected behavior: setting the volume to 50 should yield a value of 50 on a subsequent get volume.

@kingosticks
Copy link
Member

Sounds similar to #19

@wiertz
Copy link
Author

wiertz commented Jan 1, 2020

The issue gets worse when using smaller volume steps as then volume changes are ignored (see #19). The fix for me is using the volume scale 'linear'.

Just a hunch, but perhaps there is something wrong with the assumptions of transforming volume into mixer values and vice versa? The readme of the alsamixer-plugin states that 'cubic' matches the volume scale used by the alsamixer software. Yet if I use linear, getting and setting volume work consistently – and every change is reflected by the alsamixer command line util. So if alsamixer software uses cubic and by using 'linear' in the plugin I can control alsamixer, why the additional transformation of volume values in mixer.py? Anyways, since the error I observe may very likely be the cause of #19, too, perhaps it makes sense to make 'linear' the default setting, at least for the time being.

@LevitatingBusinessMan
Copy link

I just want to add that incrementing and decrementing also makes for the same inconsistencies. For instance increasing the volume by 5% occasionally leads to a 4% increase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants