Gosu::Channel
Sample#play returns a Channel that represents the sound currently being played.
This object can be used to stop sounds dynamically, or to check whether they have finished.
Constructors
Instance methods
Set the amount of panning, i.e. the position of the sound when using stereo speakers. 0.0 is the centre, negative values are to the left, positive values are to the right. If something happens on the edge of the screen, a good value for pan would be ±0.1.
Pauses the sample, to be resumed afterwards.
NOTE: The sample will still occupy a playback channel while paused.
Sets the playback speed. A value of 2.0 will play the sample at 200% speed and one octave higher. A value of 0.5 will play the sample at 50% speed and one octave lower. The valid range of this property depends on the operating system, but values up to 8.0 should work.
Stops playback of this sample instance. After calling this method, the sample instance is useless and can be discarded.
Calling stop after the sample has finished is harmless and has no effect.