Module: Audio
- Defined in:
- docs/00000_Dependencies.rb
Overview
Module responsive of handling audio in game
Defined Under Namespace
Classes: DriverBase, FMODDriver, SFMLAudioDriver
Constant Summary collapse
- FADE_IN_BY_DEFAULT =
Constant allowing maker to define if music must fade in by default
true
Class Method Summary collapse
-
.__init__
Globally initialize the audio module (after all driver has been chosen and the game was loaded).
-
.__release__
Globally release the audio module (after the game is done or if you need to swap drivers).
-
.__reset__
Globally reset the audio (when soft resetting the game or for other reasons).
-
.bgm_fade(time)
Fades the BGM.
-
.bgm_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT)
plays a BGM and stop the current one.
-
.bgm_position ⇒ Integer
Returns the BGM position.
-
.bgm_position=(position)
Set the BGM position.
-
.bgm_stop
Stop the BGM.
-
.bgs_fade(time)
Fades the BGS.
-
.bgs_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT)
plays a BGS and stop the current one.
-
.bgs_position ⇒ Integer
Returns the BGS position.
-
.bgs_position=(position)
Set the BGS position.
-
.bgs_stop
Stop the BGS.
-
.cry_play(filename, volume = 100, pitch = 100)
plays a cry.
-
.driver ⇒ DriverBase
Get the current driver.
-
.me_fade(time)
Fades the ME.
-
.me_play(filename, volume = 100, pitch = 100, preserve_bgm = false)
plays a ME and stop the current one.
-
.me_position ⇒ Integer
Returns the ME position.
-
.me_position=(position)
Set the ME position.
-
.me_stop
Stop the ME.
-
.music_channels ⇒ Array<Symbol>
Get all the music channels (to patch if you want to include more).
-
.music_volume ⇒ Integer
Get volume of bgm and me.
-
.music_volume=(value)
Set the volume of bgm and me.
-
.register_driver(driver_name, driver_class)
Register an audio driver.
-
.se_play(filename, volume = 100, pitch = 100)
plays a SE if possible.
-
.se_stop
Stop SE.
-
.sfx_channels ⇒ Array<Symbol>
Get all the sfx channels (to patch if you want to include more).
-
.sfx_volume ⇒ Integer
Get volume of sfx.
-
.sfx_volume=(value)
Set the volume of sfx.
-
.update
Update the audio (must be called every meaningful frames).
Class Method Details
.__init__
Globally initialize the audio module (after all driver has been chosen and the game was loaded)
2092 2093 |
# File 'docs/00000_Dependencies.rb', line 2092 def __init__ end |
.__release__
Globally release the audio module (after the game is done or if you need to swap drivers)
2095 2096 |
# File 'docs/00000_Dependencies.rb', line 2095 def __release__ end |
.__reset__
Globally reset the audio (when soft resetting the game or for other reasons)
2098 2099 |
# File 'docs/00000_Dependencies.rb', line 2098 def __reset__ end |
.bgm_fade(time)
Fades the BGM
2161 2162 |
# File 'docs/00000_Dependencies.rb', line 2161 def bgm_fade(time) end |
.bgm_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT)
plays a BGM and stop the current one
2149 2150 |
# File 'docs/00000_Dependencies.rb', line 2149 def bgm_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT) end |
.bgm_position ⇒ Integer
Returns the BGM position
2153 2154 |
# File 'docs/00000_Dependencies.rb', line 2153 def bgm_position end |
.bgm_position=(position)
Set the BGM position
2157 2158 |
# File 'docs/00000_Dependencies.rb', line 2157 def bgm_position=(position) end |
.bgm_stop
Stop the BGM
2164 2165 |
# File 'docs/00000_Dependencies.rb', line 2164 def bgm_stop end |
.bgs_fade(time)
Fades the BGS
2183 2184 |
# File 'docs/00000_Dependencies.rb', line 2183 def bgs_fade(time) end |
.bgs_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT)
plays a BGS and stop the current one
2171 2172 |
# File 'docs/00000_Dependencies.rb', line 2171 def bgs_play(filename, volume = 100, pitch = 100, fade_in = FADE_IN_BY_DEFAULT) end |
.bgs_position ⇒ Integer
Returns the BGS position
2175 2176 |
# File 'docs/00000_Dependencies.rb', line 2175 def bgs_position end |
.bgs_position=(position)
Set the BGS position
2179 2180 |
# File 'docs/00000_Dependencies.rb', line 2179 def bgs_position=(position) end |
.bgs_stop
Stop the BGS
2186 2187 |
# File 'docs/00000_Dependencies.rb', line 2186 def bgs_stop end |
.cry_play(filename, volume = 100, pitch = 100)
plays a cry
2223 2224 |
# File 'docs/00000_Dependencies.rb', line 2223 def cry_play(filename, volume = 100, pitch = 100) end |
.driver ⇒ DriverBase
Get the current driver
2105 2106 |
# File 'docs/00000_Dependencies.rb', line 2105 def driver end |
.me_fade(time)
Fades the ME
2205 2206 |
# File 'docs/00000_Dependencies.rb', line 2205 def me_fade(time) end |
.me_play(filename, volume = 100, pitch = 100, preserve_bgm = false)
plays a ME and stop the current one
2193 2194 |
# File 'docs/00000_Dependencies.rb', line 2193 def me_play(filename, volume = 100, pitch = 100, preserve_bgm = false) end |
.me_position ⇒ Integer
Returns the ME position
2197 2198 |
# File 'docs/00000_Dependencies.rb', line 2197 def me_position end |
.me_position=(position)
Set the ME position
2201 2202 |
# File 'docs/00000_Dependencies.rb', line 2201 def me_position=(position) end |
.me_stop
Stop the ME
2208 2209 |
# File 'docs/00000_Dependencies.rb', line 2208 def me_stop end |
.music_channels ⇒ Array<Symbol>
Get all the music channels (to patch if you want to include more)
2126 2127 |
# File 'docs/00000_Dependencies.rb', line 2126 def music_channels end |
.music_volume ⇒ Integer
Get volume of bgm and me
2118 2119 |
# File 'docs/00000_Dependencies.rb', line 2118 def music_volume end |
.music_volume=(value)
Set the volume of bgm and me
2122 2123 |
# File 'docs/00000_Dependencies.rb', line 2122 def music_volume=(value) end |
.register_driver(driver_name, driver_class)
Register an audio driver
2110 2111 |
# File 'docs/00000_Dependencies.rb', line 2110 def register_driver(driver_name, driver_class) end |
.se_play(filename, volume = 100, pitch = 100)
plays a SE if possible
2214 2215 |
# File 'docs/00000_Dependencies.rb', line 2214 def se_play(filename, volume = 100, pitch = 100) end |
.se_stop
Stop SE
2217 2218 |
# File 'docs/00000_Dependencies.rb', line 2217 def se_stop end |
.sfx_channels ⇒ Array<Symbol>
Get all the sfx channels (to patch if you want to include more)
2138 2139 |
# File 'docs/00000_Dependencies.rb', line 2138 def sfx_channels end |
.sfx_volume ⇒ Integer
Get volume of sfx
2130 2131 |
# File 'docs/00000_Dependencies.rb', line 2130 def sfx_volume end |
.sfx_volume=(value)
Set the volume of sfx
2134 2135 |
# File 'docs/00000_Dependencies.rb', line 2134 def sfx_volume=(value) end |
.update
Update the audio (must be called every meaningful frames)
2101 2102 |
# File 'docs/00000_Dependencies.rb', line 2101 def update end |