Class: Gosu::SampleInstance
- Inherits:
-
Object
- Object
- Gosu::SampleInstance
- Defined in:
- reference/gosu.rb
Overview
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.
Instance Attribute Summary (collapse)
-
- (Object) pan
writeonly
Sets the attribute pan.
-
- (Object) speed
writeonly
Sets the attribute speed.
-
- (Object) volume
writeonly
Sets the attribute volume.
Instance Method Summary (collapse)
-
- (Object) pause
Pauses this instance to be resumed afterwards.
- - (Boolean) paused?
- - (Boolean) playing?
- - (Object) resume
-
- (Object) stop
Stops this instance of a sound being played.
Instance Attribute Details
- (Object) pan=(value) (writeonly)
Sets the attribute pan
435 436 437 |
# File 'reference/gosu.rb', line 435 def pan=(value) @pan = value end |
- (Object) speed=(value) (writeonly)
Sets the attribute speed
434 435 436 |
# File 'reference/gosu.rb', line 434 def speed=(value) @speed = value end |
- (Object) volume=(value) (writeonly)
Sets the attribute volume
433 434 435 |
# File 'reference/gosu.rb', line 433 def volume=(value) @volume = value end |
Instance Method Details
- (Object) pause
Pauses this instance to be resumed afterwards. It will still keep a channel filled while paused.
440 |
# File 'reference/gosu.rb', line 440 def pause; end |
- (Boolean) paused?
441 |
# File 'reference/gosu.rb', line 441 def paused?; end |
- (Boolean) playing?
443 |
# File 'reference/gosu.rb', line 443 def ; end |
- (Object) resume
442 |
# File 'reference/gosu.rb', line 442 def resume; end |
- (Object) 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.
438 |
# File 'reference/gosu.rb', line 438 def stop; end |