Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Quasi Master Volume [[ Snippet ]]
- #==============================================================================
- # Lowers all of rpg makers audio volume.
- # Can set it to a low value so you don't have to turn off each sound
- # if you want to test quitely.
- # -100 should be silent
- #==============================================================================#
- # By Quasi (http://quasixi.wordpress.com/)
- # - 7/13/14
- #==============================================================================#
- module Quasi
- VOLUME = -70
- end
- class RPG::SE < RPG::AudioFile
- def play
- unless @name.empty?
- volume = @volume + Quasi::VOLUME
- volume = 0 if volume < 0
- Audio.se_play('Audio/SE/' + @name, volume, @pitch)
- end
- end
- end
- class RPG::BGM < RPG::AudioFile
- def play(pos = 0)
- if @name.empty?
- Audio.bgm_stop
- @@last = RPG::BGM.new
- else
- volume = @volume + Quasi::VOLUME
- volume = 0 if volume < 0
- Audio.bgm_play('Audio/BGM/' + @name, volume, @pitch, pos)
- @@last = self.clone
- end
- end
- end
- class RPG::ME < RPG::AudioFile
- def play
- if @name.empty?
- Audio.me_stop
- else
- volume = @volume + Quasi::VOLUME
- volume = 0 if volume < 0
- Audio.me_play('Audio/ME/' + @name, volume, @pitch)
- end
- end
- end
- class RPG::BGS < RPG::AudioFile
- def play(pos = 0)
- if @name.empty?
- Audio.bgs_stop
- @@last = RPG::BGS.new
- else
- volume = @volume + Quasi::VOLUME
- volume = 0 if volume < 0
- Audio.bgs_play('Audio/BGS/' + @name, volume, @pitch, pos)
- @@last = self.clone
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement