Class: DXRubySDL::SoundEffect
- Inherits:
-
Object
- Object
- DXRubySDL::SoundEffect
- Defined in:
- lib/dxruby_sdl/sound_effect.rb
Instance Method Summary collapse
- #add(wavetype = WAVE_RECT, resolution = 1000) ⇒ Object
-
#initialize(time, wavetype = WAVE_RECT, resolution = 1000) ⇒ SoundEffect
constructor
A new instance of SoundEffect.
- #play ⇒ Object
- #stop ⇒ Object
Constructor Details
#initialize(time, wavetype = WAVE_RECT, resolution = 1000) ⇒ SoundEffect
Returns a new instance of SoundEffect.
5 6 7 8 9 |
# File 'lib/dxruby_sdl/sound_effect.rb', line 5 def initialize(time, wavetype = WAVE_RECT, resolution = 1000) @time = time @time.times { yield } end |
Instance Method Details
#add(wavetype = WAVE_RECT, resolution = 1000) ⇒ Object
11 12 13 |
# File 'lib/dxruby_sdl/sound_effect.rb', line 11 def add(wavetype = WAVE_RECT, resolution = 1000) @time.times { yield } end |
#play ⇒ Object
15 16 |
# File 'lib/dxruby_sdl/sound_effect.rb', line 15 def play end |
#stop ⇒ Object
18 19 |
# File 'lib/dxruby_sdl/sound_effect.rb', line 18 def stop end |