Inheritance diagram for Exponent::Audio::CAudioBuffer:
Wraps up a stereo double audio buffer
NOTE : Class is aggressively inlined for improved performance
1.0.1 Added RMS functions
1.0.2 Added Default constructor
Definition at line 46 of file CAudioBuffer.hpp.
Enumerations with defaults for stereo and mono information.
Definition at line 66 of file CAudioBuffer.hpp.
Exponent::Audio::CAudioBuffer::CAudioBuffer | ( | const long | bufferSize | ) |
Construction
bufferSize | The size of the audio buffer to create in samples |
Exponent::Audio::CAudioBuffer::CAudioBuffer | ( | ) |
Construction
virtual Exponent::Audio::CAudioBuffer::~CAudioBuffer | ( | ) | [virtual] |
Destruction
void FORCEINLINE Exponent::Audio::CAudioBuffer::accumulateInToFloatData | ( | float ** | output, | |
const long | numberOfSamples | |||
) | [inline] |
Merge in to passed output
output | The buffer to output to | |
numberOfSamples | The number of samples to process |
Definition at line 197 of file CAudioBuffer.hpp.
References m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::applyTanhLimiting | ( | ) | [inline] |
Apply a tanh limiter to the signal. Applied to whole buffer
Definition at line 362 of file CAudioBuffer.hpp.
References m_bufferSize, and m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::changeGain | ( | const double | volume | ) | [inline] |
Change the gain
volume | The volume |
Definition at line 340 of file CAudioBuffer.hpp.
References m_bufferSize, and m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::clearWaveForm | ( | ) | [inline] |
Zero the wave form
Definition at line 146 of file CAudioBuffer.hpp.
References m_bufferSize, and m_waveData.
static FORCEINLINE double Exponent::Audio::CAudioBuffer::computeRMS | ( | const float * | buffer, | |
const long | numberOfSamplesToProcess | |||
) | [inline, static] |
Compute the RMS envelope value
buffer | The buffer to compute it on (expects size 32) | |
numberOfSamplesToProcess | <= the size of buffer |
double | The RMS value |
Definition at line 409 of file CAudioBuffer.hpp.
static FORCEINLINE double Exponent::Audio::CAudioBuffer::computeRMS | ( | const double * | buffer, | |
const long | numberOfSamplesToProcess | |||
) | [inline, static] |
Compute the RMS envelope value
buffer | The buffer to compute it on (expects size 32) | |
numberOfSamplesToProcess | <= the size of buffer |
double | The RMS value |
Definition at line 379 of file CAudioBuffer.hpp.
void FORCEINLINE Exponent::Audio::CAudioBuffer::copyToFloatBufferFromWaveData | ( | float ** | waveData, | |
const long | numberOfSamples | |||
) | [inline] |
Copy to a float wave
waveData | The buffer to copy to | |
numberOfSamples | The number of samples to copy |
Definition at line 304 of file CAudioBuffer.hpp.
References m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::denormal | ( | const long | numberOfSamples | ) | [inline] |
Denormal this buffer of audio
numberOfSamples | How many samples to data should be denormaled? |
Definition at line 325 of file CAudioBuffer.hpp.
References CAUDIO_BUFFER_DENORMAL, and m_waveData.
const double** Exponent::Audio::CAudioBuffer::getAudioData | ( | ) | const [inline] |
Get a constant raw wave information
double** | The audio data |
Definition at line 105 of file CAudioBuffer.hpp.
References m_waveData.
long Exponent::Audio::CAudioBuffer::getBufferSize | ( | ) | const [inline] |
Get the blocksize
long | The buffer size |
Definition at line 239 of file CAudioBuffer.hpp.
References m_bufferSize.
Referenced by mergeWithBuffer(), and setFromAudioBuffer().
FORCEINLINE double* Exponent::Audio::CAudioBuffer::getChannel | ( | const long | channel | ) | [inline] |
Get channel data
channel | The channel you want - NOT RANGE CHECKED! |
double* | The channel data |
Definition at line 112 of file CAudioBuffer.hpp.
References m_waveData.
Referenced by mergeWithBuffer(), and setFromAudioBuffer().
void Exponent::Audio::CAudioBuffer::getMaxSamples | ( | double & | left, | |
double & | right | |||
) |
Get the maximum samples for each channel
left | filled with the left channels samples | |
right | filled with the right channels samples |
double** Exponent::Audio::CAudioBuffer::getMutableAudioData | ( | ) | const [inline] |
Get the raw wave information
double** | The mutable audio data |
Definition at line 99 of file CAudioBuffer.hpp.
References m_waveData.
FORCEINLINE double Exponent::Audio::CAudioBuffer::getSample | ( | const long | channel, | |
const long | index | |||
) | [inline] |
Get a specific sample - not recommended for high speed
channel | The channel to get the sample from | |
index | The sample index to get |
double | The sample |
Definition at line 120 of file CAudioBuffer.hpp.
References m_waveData.
void Exponent::Audio::CAudioBuffer::initialise | ( | const long | bufferSize | ) |
Initialise the audio data (deletes old buffers)
bufferSize | The size of the audio buffer to use |
void FORCEINLINE Exponent::Audio::CAudioBuffer::mergeChannels | ( | ) | [inline] |
Merge left and right
Definition at line 158 of file CAudioBuffer.hpp.
References m_bufferSize, and m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::mergeToBuffer | ( | double * | output, | |
const long | numberOfSamples | |||
) | [inline] |
Merge and store in the passed buffer
output | The output buffer | |
numberOfSamples | The number of samples to process |
CException | If the output buffer is NULL |
Definition at line 217 of file CAudioBuffer.hpp.
References m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::mergeWithBuffer | ( | CAudioBuffer * | buffer | ) | [inline] |
Merge with another buffer
buffer | The buffer to merge with |
CException | thrown if the bufer to be merged with has a different sized buffer |
Definition at line 171 of file CAudioBuffer.hpp.
References e_left, e_right, getBufferSize(), getChannel(), m_bufferSize, and m_waveData.
void Exponent::Audio::CAudioBuffer::reInitialise | ( | const long | bufferSize | ) |
Uninit then init
bufferSize | The size of the audio buffer to use |
void FORCEINLINE Exponent::Audio::CAudioBuffer::setFromAudioBuffer | ( | CAudioBuffer * | buffer | ) | [inline] |
Set from another audiobuffer
buffer | The buffer to copy |
CException | thrown if the bufer to be merged with has a different sized buffer |
Definition at line 248 of file CAudioBuffer.hpp.
References e_left, e_right, getBufferSize(), getChannel(), m_bufferSize, and m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::setWaveDataFromFloatData | ( | float ** | waveData, | |
const long | numberOfSamples | |||
) | [inline] |
Set the audio data from float data
waveData | The data to copy | |
numberOfSamples | The number of samples to process |
Definition at line 264 of file CAudioBuffer.hpp.
References m_waveData.
void FORCEINLINE Exponent::Audio::CAudioBuffer::setWaveDataFromFloatDataAndDenormal | ( | float ** | waveData, | |
const long | numberOfSamples | |||
) | [inline] |
Set the audio data from float data and denormal
waveData | The data to copy | |
numberOfSamples | The number of samples to process |
Definition at line 284 of file CAudioBuffer.hpp.
References CAUDIO_BUFFER_DENORMAL, and m_waveData.
void Exponent::Audio::CAudioBuffer::uninitialise | ( | ) |
Uninitialise the audio data
const double Exponent::Audio::CAudioBuffer::CAUDIO_BUFFER_DENORMAL [static] |
Denormal value
Definition at line 58 of file CAudioBuffer.hpp.
Referenced by denormal(), and setWaveDataFromFloatDataAndDenormal().
long Exponent::Audio::CAudioBuffer::m_bufferSize [protected] |
The buffer size
Definition at line 432 of file CAudioBuffer.hpp.
Referenced by applyTanhLimiting(), changeGain(), clearWaveForm(), getBufferSize(), mergeChannels(), mergeWithBuffer(), and setFromAudioBuffer().
double** Exponent::Audio::CAudioBuffer::m_waveData [protected] |
The wave data
Definition at line 431 of file CAudioBuffer.hpp.
Referenced by accumulateInToFloatData(), applyTanhLimiting(), changeGain(), clearWaveForm(), copyToFloatBufferFromWaveData(), denormal(), getAudioData(), getChannel(), getMutableAudioData(), getSample(), mergeChannels(), mergeToBuffer(), mergeWithBuffer(), setFromAudioBuffer(), setWaveDataFromFloatData(), and setWaveDataFromFloatDataAndDenormal().