From 955c75a3d2b9d66175ee78a523500f4cc514bac8 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Thu, 23 Jul 2009 23:38:58 -0700 Subject: Rename setvol; new volume? and crossfade? methods. --- libmpd/playbackoptions.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'libmpd') diff --git a/libmpd/playbackoptions.rb b/libmpd/playbackoptions.rb index ead7fab..fd83d9e 100644 --- a/libmpd/playbackoptions.rb +++ b/libmpd/playbackoptions.rb @@ -36,10 +36,20 @@ module MPDPlaybackOptions end # Sets volume from a range of 0-100. - def setvol volume + def volume volume return send_request 'setvol ' + volume.to_s end + # Returns the current volume as an integer. + def volume? + return status[:volume].to_i + end + + # Returns the current crossfade setting as an integer. + def crossfade? + return status[:xfade].to_i + end + # Sets single state. # When single is activated, playback is stopped after the current song. If # repeat is also activated, the current song is repeated. -- cgit v1.2.3-70-g09d2