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

Support MPD volume command #1393

Closed
kingosticks opened this Issue Jan 11, 2016 · 3 comments

Comments

3 participants
@kingosticks
Member

kingosticks commented Jan 11, 2016

The MPD volume command was deprecated in mpd v0.16 (2010/12/11) and then re-added in mpd v0.18 (2013/10/31). The command allows you to specify a relative volume (between -100 and 100). It is used by mpc and we should add support for it.

The MPD setvol command is supposed to set an absolute volume (between 0 and 100). Both Mopidy's and mpd's implementations accept and ignore a '+' character before the value. mpd does not accept a '-' character before the value; whereas Mopidy will set the volume to 0. mpd is strict about the 0 to 100 range and will error if outside of this. These setvol differences probably aren't a big deal, Mopidy's arguably makes more sense.

Command mpd (v0.19.10) Mopidy (v1.1.1)
setvol 50 OK - volume: 50 OK - volume: 50
setvol +30 OK - volume: 30 OK - volume: 30
setvol -10 ACK [2@0] {setvol} Number too large: -10 OK - volume: 0
setvol 101 ACK [2@0] {setvol} Invalid volume value OK - volume: 100
volume +40 OK - volume: 70 ACK [5@0] {} unknown command "volume"
volume +101 ACK [2@0] {volume} Invalid volume value ACK [5@0] {} unknown command "volume"
@trygveaa

This comment has been minimized.

Member

trygveaa commented Jan 11, 2016

The MPD volume command was deprecated in mpd v0.16 (2010/12/11)

Slight correction: It was removed in 0.16. It was deprecated in 0.10.0 (2004/3/3) (when setvol was added). But yeah, since mpd "recently" re-added it, and mpc uses it, we should probably support it.

@jodal jodal self-assigned this Jan 17, 2016

@jodal jodal added this to the v1.1.2 - Bugfixes milestone Jan 17, 2016

@jodal

This comment has been minimized.

Member

jodal commented Jan 17, 2016

This is such an simple addition that I think it can safely go into 1.1.2.

@jodal

This comment has been minimized.

Member

jodal commented Jan 18, 2016

Fixed by #1397.

@jodal jodal closed this Jan 18, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment