Switchboard SDK
Loading...
Searching...
No Matches
switchboard::ClippingDetector Class Reference

Class to detect clipping in a given audio buffer. More...

#include <ClippingDetector.hpp>

Public Member Functions

 ClippingDetector (uint sampleRate=constants::DEFAULT_SAMPLERATE, uint secondsToReset=1)
 ClippingDetector constructor.
 
ClippingType detectClipping (const float *audioData, const uint numberOfSamples)
 Detects clipping in a given audio data.
 
void setSampleRate (uint sampleRate)
 Sets the sample rate.
 

Detailed Description

Class to detect clipping in a given audio buffer.

ClippingDetector

Constructor & Destructor Documentation

◆ ClippingDetector()

switchboard::ClippingDetector::ClippingDetector ( uint sampleRate = constants::DEFAULT_SAMPLERATE,
uint secondsToReset = 1 )

ClippingDetector constructor.

Parameters
sampleRateSample rate of audio data.
secondsToResetNumber of seconds of silence needed to reset clipping detection.

Member Function Documentation

◆ setSampleRate()

void switchboard::ClippingDetector::setSampleRate ( uint sampleRate)

Sets the sample rate.

Parameters
sampleRateThe sample rate to set.