LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches
lasp_clip.h
Go to the documentation of this file.
1// lasp_clip.h
2//
3// Author: J.A. de Jong, C.R.D. Jansen - ASCEE
4//
5// Description: Clip handler
6#pragma once
7#include <memory>
8#include "lasp_filter.h"
9#include "lasp_mathtypes.h"
11
24class ClipHandler: public ThreadedInDataHandler<ClipHandler> {
25
29 static inline const d clip_point = 0.98;
30
35 static inline const d clip_indication_time = 2.0;
36
40 d _dt;
41
42
43 mutable std::mutex _mtx;
48 vd _clip_time;
49
53 vd _max_range;
54
55 public:
63
69 arma::uvec getCurrentValue() const;
70
71 void inCallback(const DaqData& );
72 void reset(const Daq*);
73
74};
75
Clipping detector (Clip). Detects when a signal overdrives the input.
Definition lasp_clip.h:24
arma::uvec getCurrentValue() const
Get the current values of the clip handler. Returns a vector of of True's.
Definition lasp_clip.cpp:57
void inCallback(const DaqData &)
Definition lasp_clip.cpp:21
void reset(const Daq *)
Definition lasp_clip.cpp:68
Data coming from / going to DAQ. Non-interleaved format, which means data in buffer is ordered by cha...
Base cass for all DAQ (Data Acquisition) interfaces. A DAQ can be a custom device,...
Definition lasp_daq.h:29
A bit of curiously recurring template pattern, to connect the specific handlers and connect the prope...
std::shared_ptr< StreamMgr > SmgrHandle
arma::Col< d > vd