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

A simple ducking compressor implementation that adjusts the gain of the processed audio buffers. More...

#include <SimpleDuckingCompressor.hpp>

Inheritance diagram for switchboard::SimpleDuckingCompressor:
switchboard::DuckingCompressor

Public Member Functions

 SimpleDuckingCompressor ()
 SimpleDuckingCompressor constructor.
 
 ~SimpleDuckingCompressor ()
 SimpleDuckingCompressor destructor.
 
void setSampleRate (const uint sampleRate)
 Sets the sample rate.
 
void setThresholdDb (const float threshold)
 Sets he threshold of the compressor in dB (0 = no ducking).
 
void process (float *buffer, const uint numberOfFrames)
 Runs the audio compression algorithm on an audio buffer.
 
- Public Member Functions inherited from switchboard::DuckingCompressor
virtual ~DuckingCompressor ()
 DuckingCompressor destructor.
 

Detailed Description

A simple ducking compressor implementation that adjusts the gain of the processed audio buffers.

Member Function Documentation

◆ process()

void switchboard::SimpleDuckingCompressor::process ( float * buffer,
const uint numberOfFrames )
virtual

Runs the audio compression algorithm on an audio buffer.

Parameters
bufferThe stereo interleaved audio buffer.
numberOfFramesThe number of frames in the audio buffer.

Implements switchboard::DuckingCompressor.

◆ setSampleRate()

void switchboard::SimpleDuckingCompressor::setSampleRate ( const uint sampleRate)
virtual

Sets the sample rate.

Parameters
sampleRateThe new sampleRate.

Implements switchboard::DuckingCompressor.

◆ setThresholdDb()

void switchboard::SimpleDuckingCompressor::setThresholdDb ( const float threshold)
virtual

Sets he threshold of the compressor in dB (0 = no ducking).

Parameters
thresholdThe new threshold value in dB.

Implements switchboard::DuckingCompressor.