Class: AudioStream::AudioInputSynth
- Inherits:
-
Object
- Object
- AudioStream::AudioInputSynth
- Includes:
- AudioInput
- Defined in:
- lib/audio_stream/audio_input_synth.rb
Instance Method Summary collapse
- #connect ⇒ Object
- #connected? ⇒ Boolean
- #disconnect ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(synth, soundinfo:) ⇒ AudioInputSynth
constructor
A new instance of AudioInputSynth.
Constructor Details
#initialize(synth, soundinfo:) ⇒ AudioInputSynth
Returns a new instance of AudioInputSynth.
5 6 7 8 9 10 |
# File 'lib/audio_stream/audio_input_synth.rb', line 5 def initialize(synth, soundinfo:) super() @synth = synth @soundinfo = soundinfo end |
Instance Method Details
#connect ⇒ Object
12 13 14 |
# File 'lib/audio_stream/audio_input_synth.rb', line 12 def connect self end |
#connected? ⇒ Boolean
20 21 22 |
# File 'lib/audio_stream/audio_input_synth.rb', line 20 def connected? true end |
#disconnect ⇒ Object
16 17 18 |
# File 'lib/audio_stream/audio_input_synth.rb', line 16 def disconnect self end |
#each(&block) ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/audio_stream/audio_input_synth.rb', line 24 def each(&block) Enumerator.new do |y| loop { buf = @synth.next y << buf } end.each(&block) end |