ASPiK SDK
Loading...
Searching...
No Matches
PeakLimiter Class Reference

The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired versio of the DynamicsProcessor. More...

#include <fxobjects.h>

Inheritance diagram for PeakLimiter:
IAudioSignalProcessor

Public Member Functions

virtual bool reset (double _sampleRate)
 
virtual bool canProcessAudioFrame ()
 
virtual double processAudioSample (double xn)
 
double computeGain (double detect_dB)
 
void setThreshold_dB (double _threshold_dB)
 
void setMakeUpGain_dB (double _makeUpGain_dB)
 
- Public Member Functions inherited from IAudioSignalProcessor
virtual bool reset (double _sampleRate)=0
 
virtual double processAudioSample (double xn)=0
 
virtual bool canProcessAudioFrame ()=0
 
virtual void setSampleRate (double _sampleRate)
 
virtual void enableAuxInput (bool enableAuxInput)
 
virtual double processAuxInputAudioSample (double xn)
 
virtual bool processAudioFrame (const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
 

Protected Attributes

AudioDetector detector
 the detector object
 
double threshold_dB = 0.0
 stored threshold (dB)
 
double makeUpGain_dB = 0.0
 stored makeup gain (dB)
 

Detailed Description

The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired versio of the DynamicsProcessor.

Audio I/O:

  • Processes mono input to mono output.

Control I/F:

Author
Will Pirkle http://www.willpirkle.com
Remarks
This object is included in Designing Audio Effects Plugins in C++ 2nd Ed. by Will Pirkle
Version
Revision : 1.0
Date
Date : 2018 / 09 / 7

Member Function Documentation

◆ canProcessAudioFrame()

virtual bool PeakLimiter::canProcessAudioFrame ( )
inlinevirtual

return false: this object only processes samples

Implements IAudioSignalProcessor.

◆ computeGain()

double PeakLimiter::computeGain ( double  detect_dB)
inline

compute the gain reductino value based on detected value in dB

◆ processAudioSample()

virtual double PeakLimiter::processAudioSample ( double  xn)
inlinevirtual

process audio: implement hard limiter

Parameters
xninput
Returns
the processed sample

Implements IAudioSignalProcessor.

◆ reset()

virtual bool PeakLimiter::reset ( double  _sampleRate)
inlinevirtual

reset members to initialized state

Implements IAudioSignalProcessor.

◆ setMakeUpGain_dB()

void PeakLimiter::setMakeUpGain_dB ( double  _makeUpGain_dB)
inline

adjust makeup gain in dB

◆ setThreshold_dB()

void PeakLimiter::setThreshold_dB ( double  _threshold_dB)
inline

adjust threshold in dB


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