An instance of a Sample playing. Can be used to stop sounds dynamically, or to check if they are finished. It is recommended that you throw away sample instances if possible, as they could accidentally refer to other sounds being played after a very long time has passed.
Attributes
Name | Read/write? |
---|---|
pan | W |
speed | W |
volume | W |
Public Instance Methods
pause ()
Pauses this instance to be resumed afterwards. It will still keep a channel filled while paused.
# File reference/gosu.rb, line 292 def pause; end
stop ()
Stops this instance of a sound being played. Calling this twice, or too late, does not do any harm. You can nil out the reference to the instance afterwards as it will be useless.
# File reference/gosu.rb, line 290 def stop; end