LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches

Clipping detector (Clip). Detects when a signal overdrives the input. More...

#include <lasp_clip.h>

Inheritance diagram for ClipHandler:
Collaboration diagram for ClipHandler:

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.
 

Detailed Description

Clipping detector (Clip). Detects when a signal overdrives the input.

Definition at line 24 of file lasp_clip.h.

Constructor & Destructor Documentation

◆ ClipHandler()

ClipHandler::ClipHandler ( SmgrHandle  mgr)

Constructs Clipping indicator.

Parameters
mgrStream Mgr to operate on

Definition at line 14 of file lasp_clip.cpp.

◆ ~ClipHandler()

ClipHandler::~ClipHandler ( )

Definition at line 92 of file lasp_clip.cpp.

Member Function Documentation

◆ getCurrentValue()

arma::uvec ClipHandler::getCurrentValue ( ) const

Get the current values of the clip handler. Returns a vector of of True's.

Returns
clipping indication

Definition at line 57 of file lasp_clip.cpp.

◆ inCallback()

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.

◆ reset()

void ClipHandler::reset ( const Daq daq)

Definition at line 68 of file lasp_clip.cpp.


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