From 80a2c9b1e14b5ed6a68107db407568e63547ac8d Mon Sep 17 00:00:00 2001 From: Tom Black Date: Wed, 12 Dec 2018 00:00:19 -0800 Subject: Use Simple 2D API to get and set music volume --- lib/ruby2d/music.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3