diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 23:38:58 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2009-07-23 23:38:58 -0700 |
commit | 955c75a3d2b9d66175ee78a523500f4cc514bac8 (patch) | |
tree | fcfac497b4b69e16810394ee19f68b8263d7d8c0 /libmpd | |
parent | 34a8e8b5048ca530addc781bfb96721bd23e9704 (diff) | |
download | ruby-libmpd-955c75a3d2b9d66175ee78a523500f4cc514bac8.tar.gz ruby-libmpd-955c75a3d2b9d66175ee78a523500f4cc514bac8.tar.xz |
Rename setvol; new volume? and crossfade? methods.
Diffstat (limited to 'libmpd')
-rw-r--r-- | libmpd/playbackoptions.rb | 12 |
1 files changed, 11 insertions, 1 deletions
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. |