libsdr  0.1.0
A simple SDR library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sdr::FMDeemph< Scalar > Class Template Reference

A tiny node to de-emphasize the higher frequencies of a FM transmitted audio signal. More...

#include <demod.hh>

Inheritance diagram for sdr::FMDeemph< Scalar >:
sdr::Sink< Scalar > sdr::Source sdr::SinkBase

Public Member Functions

 FMDeemph (bool enabled=true)
 Constructor. More...
 
virtual ~FMDeemph ()
 Destructor. More...
 
bool isEnabled () const
 Returns true if the filter node is enabled. More...
 
void enable (bool enabled)
 Enable/Disable the filter node. More...
 
virtual void config (const Config &src_cfg)
 Configures the node. More...
 
virtual void process (const Buffer< Scalar > &buffer, bool allow_overwrite)
 Dispatches in- or out-of-place filtering. More...
 
- Public Member Functions inherited from sdr::Sink< Scalar >
 Sink ()
 Constructor. More...
 
virtual ~Sink ()
 Drestructor. More...
 
virtual void handleBuffer (const RawBuffer &buffer, bool allow_overwrite)
 Re-implemented from SinkBase. More...
 
- Public Member Functions inherited from sdr::SinkBase
 SinkBase ()
 Constructor. More...
 
virtual ~SinkBase ()
 Destructor. More...
 
- Public Member Functions inherited from sdr::Source
 Source ()
 Constructor. More...
 
virtual ~Source ()
 Destructor. More...
 
virtual void send (const RawBuffer &buffer, bool allow_overwrite=false)
 Sends the given buffer to all connected sinks. More...
 
void connect (SinkBase *sink, bool direct=false)
 Connect this source to a sink. More...
 
void disconnect (SinkBase *sink)
 Disconnect a sink again. More...
 
virtual void setConfig (const Config &config)
 Stores the configuration and propergates it if the configuration has been changed. More...
 
virtual double sampleRate () const
 Returns the configured sample rate or 0 otherwise. More...
 
virtual Config::Type type () const
 Returns the configured source type or Config::Type_UNDEFINED otherwise. More...
 
template<class T >
void addEOS (T *instance, void(T::*function)())
 Adds a callback to the end-of-stream signal of the source. More...
 

Protected Member Functions

void _process (const Buffer< Scalar > &in, const Buffer< Scalar > &out)
 Performs the actual filtering. More...
 
- Protected Member Functions inherited from sdr::Source
void signalEOS ()
 Signals the EOS. More...
 
void propagateConfig (const Config &config)
 Propagates the given configuration to all connected sinks. More...
 

Protected Attributes

bool _enabled
 If true, the filter is enabled. More...
 
int _alpha
 Filter constant. More...
 
Scalar _avg
 Current averaged value. More...
 
Buffer< Scalar > _buffer
 The output buffer. More...
 
- Protected Attributes inherited from sdr::Source
Config _config
 Holds the source configuration, this can be updated by calling setConfig. More...
 
std::map< SinkBase *, bool > _sinks
 The connected sinks. More...
 
std::list< DelegateInterface * > _eos
 The connected EOS singal handlers. More...
 

Detailed Description

template<class Scalar>
class sdr::FMDeemph< Scalar >

A tiny node to de-emphasize the higher frequencies of a FM transmitted audio signal.

Constructor & Destructor Documentation

template<class Scalar >
sdr::FMDeemph< Scalar >::FMDeemph ( bool  enabled = true)
inline

Constructor.

template<class Scalar >
virtual sdr::FMDeemph< Scalar >::~FMDeemph ( )
inlinevirtual

Destructor.

Member Function Documentation

template<class Scalar >
void sdr::FMDeemph< Scalar >::_process ( const Buffer< Scalar > &  in,
const Buffer< Scalar > &  out 
)
inlineprotected

Performs the actual filtering.

template<class Scalar >
virtual void sdr::FMDeemph< Scalar >::config ( const Config src_cfg)
inlinevirtual

Configures the node.

Implements sdr::SinkBase.

template<class Scalar >
void sdr::FMDeemph< Scalar >::enable ( bool  enabled)
inline

Enable/Disable the filter node.

template<class Scalar >
bool sdr::FMDeemph< Scalar >::isEnabled ( ) const
inline

Returns true if the filter node is enabled.

template<class Scalar >
virtual void sdr::FMDeemph< Scalar >::process ( const Buffer< Scalar > &  buffer,
bool  allow_overwrite 
)
inlinevirtual

Dispatches in- or out-of-place filtering.

Implements sdr::Sink< Scalar >.

Member Data Documentation

template<class Scalar >
int sdr::FMDeemph< Scalar >::_alpha
protected

Filter constant.

template<class Scalar >
Scalar sdr::FMDeemph< Scalar >::_avg
protected

Current averaged value.

template<class Scalar >
Buffer<Scalar> sdr::FMDeemph< Scalar >::_buffer
protected

The output buffer.

template<class Scalar >
bool sdr::FMDeemph< Scalar >::_enabled
protected

If true, the filter is enabled.

If not, the node is a NOP.


The documentation for this class was generated from the following file: