Class: Plaything::OpenAL::Source
- Inherits:
-
TypeClass
- Object
- TypeClass
- Plaything::OpenAL::Source
- Defined in:
- lib/plaything/objects/source.rb
Instance Method Summary collapse
-
#detach_buffers ⇒ Object
Detach all queued or attached buffers.
-
#playing? ⇒ Boolean
True if source is in stopped state.
-
#state ⇒ Symbol
:initial, :paused, :playing, :stopped.
-
#stopped? ⇒ Boolean
True if source is in stopped state.
Instance Method Details
#detach_buffers ⇒ Object
Note:
all buffers must be processed for this operation to succeed.
Note:
all buffers are considered processed when #stopped?.
Detach all queued or attached buffers.
10 11 12 |
# File 'lib/plaything/objects/source.rb', line 10 def detach_buffers set(:buffer, 0) end |
#playing? ⇒ Boolean
Returns true if source is in stopped state.
25 26 27 |
# File 'lib/plaything/objects/source.rb', line 25 def state == :playing end |
#state ⇒ Symbol
Returns :initial, :paused, :playing, :stopped.
15 16 17 |
# File 'lib/plaything/objects/source.rb', line 15 def state get(:source_state) end |
#stopped? ⇒ Boolean
Returns true if source is in stopped state.
20 21 22 |
# File 'lib/plaything/objects/source.rb', line 20 def stopped? state == :stopped end |