Class: DXRubySDL::SoundEffect

Inherits:
Object
  • Object
show all
Defined in:
lib/dxruby_sdl/sound_effect.rb

Instance Method Summary collapse

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

#playObject



15
16
# File 'lib/dxruby_sdl/sound_effect.rb', line 15

def play
end

#stopObject



18
19
# File 'lib/dxruby_sdl/sound_effect.rb', line 18

def stop
end