LASP 1.0
Library for Acoustic Signal Processing
|
Clipping detector (Clip). Detects when a signal overdrives the input. More...
#include <lasp_clip.h>
Public Member Functions | |
ClipHandler (SmgrHandle mgr) | |
Constructs Clipping indicator. | |
~ClipHandler () | |
arma::uvec | getCurrentValue () const |
Get the current values of the clip handler. Returns a vector of of True's. | |
void | inCallback (const DaqData &) |
void | reset (const Daq *) |
Public Member Functions inherited from ThreadedInDataHandler< ClipHandler > | |
ThreadedInDataHandler (SmgrHandle mgr) | |
void | _reset (const Daq *daq) |
void | _inCallback (const DaqData &data) |
Public Member Functions inherited from ThreadedInDataHandlerBase | |
ThreadedInDataHandlerBase (SmgrHandle mgr, InCallbackType cb, InResetType reset) | |
~ThreadedInDataHandlerBase () | |
void | startThread () |
This method should be called from the derived class' constructor, to start the thread and data is incoming. | |
void | stopThread () |
This method SHOULD be called from all classes that derive on ThreadedInDataHandler. It is to make sure the inCallback_threaded() function is no longer called when the destructor of the derived class is called. Not calling this function is regarded as a BUG. | |
Clipping detector (Clip). Detects when a signal overdrives the input.
Definition at line 24 of file lasp_clip.h.
ClipHandler::ClipHandler | ( | SmgrHandle | mgr | ) |
Constructs Clipping indicator.
mgr | Stream Mgr to operate on |
Definition at line 14 of file lasp_clip.cpp.
ClipHandler::~ClipHandler | ( | ) |
Definition at line 92 of file lasp_clip.cpp.
arma::uvec ClipHandler::getCurrentValue | ( | ) | const |
Get the current values of the clip handler. Returns a vector of of True's.
Definition at line 57 of file lasp_clip.cpp.
void ClipHandler::inCallback | ( | const DaqData & | d | ) |
Obtain max abs values for each column, convert this row-vec to a column vector, and scale with the max-range for each channel
Find indices for channels that have a clip
Reset clip counter
Reset to 'unclipped'
Add a bit of clip time
Definition at line 21 of file lasp_clip.cpp.
void ClipHandler::reset | ( | const Daq * | daq | ) |
Definition at line 68 of file lasp_clip.cpp.