Class: Radio::Filter
- Inherits:
-
Object
- Object
- Radio::Filter
- Defined in:
- lib/radio/filter.rb,
lib/radio/filters/iq.rb,
lib/radio/filters/agc.rb,
lib/radio/filters/fir.rb
Overview
This generic Filter class will optimize by replacing its #call with an optimized version from a module. The type of data and initializer options determine the module to load.
Defined Under Namespace
Modules: Agc, Fir, InterpolateFir, Iq, Mix, MixDecimateFir, MixFir, MixInterpolateFir, SetupFir
Constant Summary collapse
- TYPES =
%w{ iq mix interpolate decimate fir agc }.collect(&:to_sym).freeze
Instance Method Summary collapse
- #call(data, &block) ⇒ Object
- #call!(data, &block) ⇒ Object
-
#initialize(options) ⇒ Filter
constructor
A new instance of Filter.
- #setup ⇒ Object
Constructor Details
Instance Method Details
#call(data, &block) ⇒ Object
37 38 39 40 |
# File 'lib/radio/filter.rb', line 37 def call data, &block extend_by_data_type data call data, &block end |
#call!(data, &block) ⇒ Object
42 43 44 45 |
# File 'lib/radio/filter.rb', line 42 def call! data, &block extend_by_data_type data call! data, &block end |
#setup ⇒ Object
47 48 49 |
# File 'lib/radio/filter.rb', line 47 def setup # noop end |