Class: AudioStream::AudioInputBuffer
- Inherits:
-
Object
- Object
- AudioStream::AudioInputBuffer
show all
- Includes:
- AudioInput
- Defined in:
- lib/audio_stream/audio_input_buffer.rb
Instance Attribute Summary
Attributes included from AudioInput
#connection
Instance Method Summary
collapse
Methods included from AudioInput
buffer, device, file, #publish, #published?, #sync
#fx, #mono, #notify_complete, #notify_next, #send_to, #stereo, #subscribe, #subscribe_on_next
Constructor Details
Returns a new instance of AudioInputBuffer.
5
6
7
|
# File 'lib/audio_stream/audio_input_buffer.rb', line 5
def initialize(buffers)
@buffers = [buffers].flatten.compact
end
|
Instance Method Details
#connect ⇒ Object
9
10
11
|
# File 'lib/audio_stream/audio_input_buffer.rb', line 9
def connect
self
end
|
#connected? ⇒ Boolean
17
18
19
|
# File 'lib/audio_stream/audio_input_buffer.rb', line 17
def connected?
true
end
|
#disconnect ⇒ Object
13
14
15
|
# File 'lib/audio_stream/audio_input_buffer.rb', line 13
def disconnect
self
end
|
#each(&block) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/audio_stream/audio_input_buffer.rb', line 21
def each(&block)
Enumerator.new do |y|
@buffers.each {|buf|
y << buf
}
end.each(&block)
end
|