Class: AudioStream::AudioObservableFx

Inherits:
Object
  • Object
show all
Includes:
AudioObservable, AudioObserver
Defined in:
lib/audio_stream/audio_observable_fx.rb

Instance Method Summary collapse

Methods included from AudioObservable

#fx, #mono, #notify_complete, #notify_next, #send_to, #stereo, #subscribe, #subscribe_on_next

Methods included from AudioObserver

#update

Constructor Details

#initialize(effector) ⇒ AudioObservableFx

Returns a new instance of AudioObservableFx.



7
8
9
# File 'lib/audio_stream/audio_observable_fx.rb', line 7

def initialize(effector)
  @effector = effector
end

Instance Method Details

#on_completeObject



16
17
18
# File 'lib/audio_stream/audio_observable_fx.rb', line 16

def on_complete
  notify_complete
end

#on_next(input) ⇒ Object



11
12
13
14
# File 'lib/audio_stream/audio_observable_fx.rb', line 11

def on_next(input)
  output = @effector.process(input)
  notify_next(output)
end