Class: Plaything::OpenAL::Source

Inherits:
TypeClass
  • Object
show all
Defined in:
lib/plaything/objects/source.rb

Instance Method Summary collapse

Instance Method Details

#detach_buffersObject

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.

Returns:

  • (Boolean)

    true if source is in stopped state.



25
26
27
# File 'lib/plaything/objects/source.rb', line 25

def playing?
  state == :playing
end

#stateSymbol

Returns :initial, :paused, :playing, :stopped.

Returns:

  • (Symbol)

    :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.

Returns:

  • (Boolean)

    true if source is in stopped state.



20
21
22
# File 'lib/plaything/objects/source.rb', line 20

def stopped?
  state == :stopped
end