summaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorTom Black <[email protected]>2018-12-12 00:00:19 -0800
committerTom Black <[email protected]>2018-12-12 00:00:19 -0800
commit80a2c9b1e14b5ed6a68107db407568e63547ac8d (patch)
treefb5b55176d47ce53849a6ef4c240e3466f40e530 /lib
parentfd8b90bd1d5e874f0402af069fd7dd266b68532f (diff)
downloadruby2d-80a2c9b1e14b5ed6a68107db407568e63547ac8d.tar.gz
ruby2d-80a2c9b1e14b5ed6a68107db407568e63547ac8d.zip
Use Simple 2D API to get and set music volume
Diffstat (limited to 'lib')
-rw-r--r--lib/ruby2d/music.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ruby2d/music.rb b/lib/ruby2d/music.rb
index e47131e..bc4ec5a 100644
--- a/lib/ruby2d/music.rb
+++ b/lib/ruby2d/music.rb
@@ -39,16 +39,16 @@ module Ruby2D
ext_stop
end
- # Returns the previous volume setting, in percentage
+ # Returns the volume, in percentage
def self.volume
- self.ext_volume(-1)
+ self.ext_get_volume
end
# Set music volume, 0 to 100%
def self.volume=(v)
# If a negative value, volume will be 0
if v < 0 then v = 0 end
- self.ext_volume(v)
+ self.ext_set_volume(v)
end
# Alias instance methods to class methods