Class: Gosu::Sample
- Inherits:
-
Object
- Object
- Gosu::Sample
- Defined in:
- rdoc/gosu.rb
Overview
A sample is a short sound that is completely loaded in memory, can be played multiple times at once and offers very flexible playback parameters. Use samples for everything that’s not music.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Sample
constructor
Loads a sample from a file.
-
#play(volume = 1, speed = 1, looping = false) ⇒ Channel
Plays the sample without panning.
-
#play_pan(pan = 0, volume = 1, speed = 1, looping = false) ⇒ Channel
Plays the sample with panning.
Constructor Details
Instance Method Details
#play(volume = 1, speed = 1, looping = false) ⇒ Channel
Plays the sample without panning.
580 |
# File 'rdoc/gosu.rb', line 580 def play(volume=1, speed=1, looping=false); end |
#play_pan(pan = 0, volume = 1, speed = 1, looping = false) ⇒ Channel
Plays the sample with panning.
592 |
# File 'rdoc/gosu.rb', line 592 def play_pan(pan=0, volume=1, speed=1, looping=false); end |