Audio Effects Framework
|
audio effect class for compression and expander More...
#include <AudioEffectCompressor.h>
Public Types | |
enum | EffectSubtype_t { kNone = 0, kCompressor = 1, kExpander = 2 } |
Public Types inherited from CAudioEffect | |
enum | EffectParam_t { kParamGain, kParamPan, kParamDelayInSecs, kParamFeedback, kParamModRateInHz, kParamModWidthInSecs, kParamTremoloAmount, kParamCenterFrequency, kParamQ, kParamThreshold, kParamSlope, kParamDryWetMix, kParamNumFilters, kParamFilterGains, kParamFilterDelays } |
Public Member Functions | |
CAudioEffectCompressorExpander () | |
CAudioEffectCompressorExpander (Effect_t effectType, float fSampleRateInHz, int iNumChannels, EffectSubtype_t subType=kCompressor, int iLookaheadBufferSize=150, EffectParam_t params[]=NULL, float values[]=NULL, int iNumParams=0) | |
~CAudioEffectCompressorExpander () | |
Error_t | init (Effect_t effectType, float fSampleRateInHz, int iNumChannels, EffectSubtype_t subType=kCompressor, int iLookaheadBufferSize=150, EffectParam_t params[]=NULL, float values[]=NULL, int iNumParams=0) |
Error_t | reset () |
Error_t | setParam (EffectParam_t eParam, float fValue) |
float | getParam (EffectParam_t eParam) |
Error_t | setEffectSubtype (EffectSubtype_t eValue) |
EffectSubtype_t | getEffectSubtype () |
Error_t | process (float **ppfInputBuffer, float **ppfOutputBuffer, int iNumberOfFrames) |
Public Member Functions inherited from CAudioEffect | |
CAudioEffect () | |
~CAudioEffect () | |
Effect_t | getEffectType () |
Additional Inherited Members | |
Protected Attributes inherited from CAudioEffect | |
bool | m_bIsInitialized |
true if initialized More... | |
Effect_t | m_eEffectType |
audio effect type More... | |
float | m_fSampleRateInHz |
sample rate in Hz More... | |
int | m_iNumChannels |
number of channels More... | |
audio effect class for compression and expander
CAudioEffectCompressorExpander::CAudioEffectCompressorExpander | ( | ) |
CAudioEffectCompressorExpander::CAudioEffectCompressorExpander | ( | Effect_t | effectType, |
float | fSampleRateInHz, | ||
int | iNumChannels, | ||
EffectSubtype_t | subType = kCompressor , |
||
int | iLookaheadBufferSize = 150 , |
||
EffectParam_t | params[] = NULL , |
||
float | values[] = NULL , |
||
int | iNumParams = 0 |
||
) |
CAudioEffectCompressorExpander::~CAudioEffectCompressorExpander | ( | ) |
CAudioEffectCompressorExpander::EffectSubtype_t CAudioEffectCompressorExpander::getEffectSubtype | ( | ) |
return the value of the specified sub type
float CAudioEffectCompressorExpander::getParam | ( | EffectParam_t | eParam | ) |
return the value of the specified parameter
eParam |
Error_t CAudioEffectCompressorExpander::init | ( | Effect_t | effectType, |
float | fSampleRateInHz, | ||
int | iNumChannels, | ||
EffectSubtype_t | subType = kCompressor , |
||
int | iLookaheadBufferSize = 150 , |
||
EffectParam_t | params[] = NULL , |
||
float | values[] = NULL , |
||
int | iNumParams = 0 |
||
) |
initializes a distortion instance
effectType | audio effect type |
subType | audio effect sub type |
fSampleRateInHz | sample rate in Hz |
iNumChannels | number of audio channels |
iLookaheadBufferSize | look ahead buffer size in samples |
params[] | list of parameter types |
values[] | list of parameter values |
iNumParams | number of parameters |
Error_t CAudioEffectCompressorExpander::process | ( | float ** | ppfInputBuffer, |
float ** | ppfOutputBuffer, | ||
int | iNumberOfFrames | ||
) |
processes one block of audio
ppfInputBuffer | input buffer [numChannels][iNumberOfFrames] |
ppfOutputBuffer | output buffer [numChannels][iNumberOfFrames] |
iNumberOfFrames | buffer length (per channel) |
Error_t CAudioEffectCompressorExpander::reset | ( | ) |
resets the internal variables (requires new call of init)
Error_t CAudioEffectCompressorExpander::setEffectSubtype | ( | EffectSubtype_t | eValue | ) |
sets a compression/expander sub type
eValue | value of the sub type |
Error_t CAudioEffectCompressorExpander::setParam | ( | EffectParam_t | eParam, |
float | fValue | ||
) |
sets a compression/expander parameter
eParam | what parameter |
fValue | value of the parameter |