Method: Gosu::Sample#play

Defined in:
lib/gosu_android/audio/audio.rb

#play(volume = 1, speed = 1, looping = false) ⇒ Object

Plays the sample without panning. param volume Can be anything from 0.0 (silence) to 1.0 (full volume). param speed Playback speed is only limited by the underlying audio library, and can accept very high or low values. Use 1.0 for normal playback speed.



78
79
80
81
82
83
84
# File 'lib/gosu_android/audio/audio.rb', line 78

def play(volume = 1, speed = 1, looping = false)
  if looping == false
    @stream_id = @@pool.play(@id, volume, volume, 1, 0, 1.0)
  else
    @stream_id = @@pool.play(@id, volume, volume, 1, 1, 1.0)
  end
end