Inheritance diagram for Exponent::Audio::TAudioBuffer< TypeName >:
Definition at line 36 of file TAudioBuffer.hpp.
Exponent::Audio::TAudioBuffer< TypeName >::TAudioBufferPointer |
Exponent::Audio::TAudioBuffer< TypeName >::TAudioBuffer | ( | ) | [inline] |
Construction
Definition at line 59 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples, and NULL_POINTER.
virtual Exponent::Audio::TAudioBuffer< TypeName >::~TAudioBuffer | ( | ) | [inline, virtual] |
Destruction
Definition at line 70 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().
void Exponent::Audio::TAudioBuffer< TypeName >::clearBuffer | ( | ) | [inline] |
Clear the audio data, sets all to zero
Definition at line 128 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, and Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::initialise().
bool Exponent::Audio::TAudioBuffer< TypeName >::copySamples | ( | const TypeName * | buffer, | |
const unsigned long | numberOfSamples | |||
) | [inline] |
Copy a certain number of samples from a buffer
buffer | The buffer to copy. Assumed to be in correct interleaved format | |
numberOfSamples | The total number of samples (must be <= m_numberOfSamples * m_numberOfChannels) |
bool | True if copied properly, false otherwise |
Definition at line 386 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
void Exponent::Audio::TAudioBuffer< TypeName >::denormal | ( | ) | [inline] |
Denormal the audio data
Definition at line 316 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, and Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize.
FORCEINLINE unsigned long Exponent::Audio::TAudioBuffer< TypeName >::getBufferSize | ( | ) | const [inline] |
Get teh size of the buffer
unsigned | long The total size of the buffer |
Definition at line 232 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize.
Referenced by Exponent::Audio::TWaveFileFormat< TypeName >::readData(), and Exponent::Audio::TAiffFileFormat< TypeName >::readData().
const TypeName* Exponent::Audio::TAudioBuffer< TypeName >::getChannel | ( | const unsigned long | index | ) | const [inline] |
Get a specific channel
index | The channel required |
const | TypeName* A pointer to the starting sample of this channel note that this may not necessarilly be the first sample in the actual audio data (due to interleaving) and you should not increment automatically by 1 as the frame size may be bigger |
Definition at line 161 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::operator[]().
const TypeName* Exponent::Audio::TAudioBuffer< TypeName >::getData | ( | ) | const [inline] |
Get a pointer to the start of the data
const | TypeName* A pointer to the data |
Definition at line 192 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer.
Referenced by Exponent::Audio::TWaveFileFormat< TypeName >::writeData(), and Exponent::Audio::TAiffFileFormat< TypeName >::writeData().
TypeName Exponent::Audio::TAudioBuffer< TypeName >::getMaximumSample | ( | const unsigned long | channel | ) | const [inline] |
Get the maximum sample in the entre buffer
channel | The channel to check |
TypeName | The maximum sample |
Definition at line 249 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
TypeName Exponent::Audio::TAudioBuffer< TypeName >::getMinimumSample | ( | const unsigned long | channel | ) | const [inline] |
Get the maximum sample in the entre buffer
channel | The channel to check if -1 all channels are check |
TypeName | The maximum sample |
Definition at line 270 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
TypeName* Exponent::Audio::TAudioBuffer< TypeName >::getMutableChannel | ( | const unsigned long | index | ) | [inline] |
Get a specific channel
index | The channel required |
TypeName* | A pointer to the starting sample of this channel note that this may not necessarilly be the first sample in the actual audio data (due to interleaving) and you should not increment automatically by 1 as the frame size may be bigger |
Definition at line 179 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels.
TypeName* Exponent::Audio::TAudioBuffer< TypeName >::getMutableData | ( | ) | [inline] |
Get a pointer to the start of the data
TypeName* | A pointer to the data |
Definition at line 205 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer.
Referenced by Exponent::Audio::TWaveFileFormat< TypeName >::readData(), and Exponent::Audio::TAiffFileFormat< TypeName >::readData().
FORCEINLINE unsigned long Exponent::Audio::TAudioBuffer< TypeName >::getNumberOfChannels | ( | ) | const [inline] |
Get the number of audio channels
unsigned | long The number of channels |
Definition at line 220 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels.
Referenced by Exponent::Audio::TWaveFileFormat< TypeName >::writeData(), Exponent::Audio::TAiffFileFormat< TypeName >::writeData(), and Exponent::Audio::TAudioFile< TypeName >::writeFile().
FORCEINLINE unsigned long Exponent::Audio::TAudioBuffer< TypeName >::getNumberOfSamples | ( | ) | const [inline] |
Get the number of audio samples per channel
unsigned | long The number of samples per channel |
Definition at line 226 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
Referenced by Exponent::Audio::TWaveFileFormat< TypeName >::writeData(), Exponent::Audio::TAiffFileFormat< TypeName >::writeData(), and Exponent::Audio::TAudioFile< TypeName >::writeFile().
FORCEINLINE TypeName Exponent::Audio::TAudioBuffer< TypeName >::getRMSLevel | ( | const unsigned long | channel, | |
const unsigned long | numberOfSamples, | |||
const unsigned long | startSample = 0 | |||
) | const [inline] |
Get the RMS level of a particular channel
channel | The channel to check if -1 all channels are check | |
numberOfSamples | The number of samples to process | |
startSample | The sample to start on |
TypeName | The RMS value of the buffer in the range 0 - 1 |
Definition at line 293 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::getSampleFrameSize(), Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
FORCEINLINE unsigned long Exponent::Audio::TAudioBuffer< TypeName >::getSampleFrameSize | ( | ) | const [inline] |
Each block of audio samples is interleaved with the other channels samples in to a frame
When processing you need to increment each channel point by a certain amount to move to its next sample
That value is the sample frame size returned here
unsigned | long The size of a sample frame |
Definition at line 240 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::getRMSLevel().
bool Exponent::Audio::TAudioBuffer< TypeName >::initialise | ( | const unsigned long | numberOfSamples, | |
const unsigned long | numberOfChannels | |||
) | [inline] |
Initialise with a specific number of samples and channels. Implies clearBuffer()
numberOfSamples | The length of each channel in samples | |
numberOfChannels | The number of channels in the audio buffer |
bool | True if initialised properly, false otherwise |
Definition at line 84 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::clearBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples, and Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().
bool Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelsToMono | ( | ) | [inline] |
Merge all the channels to mono at a level commensurate to the number of channels
bool | True if sucessfully merged or mono channel, false on errors |
Definition at line 335 of file TAudioBuffer.hpp.
References FREE_POINTER, Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
bool Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelToBuffer | ( | double * | buffer, | |
const unsigned long | startSample, | |||
const unsigned long | numberOfSamples, | |||
const unsigned long | channel | |||
) | [inline] |
Merge a channel to the passed audio buffer
buffer | The output audio buffer | |
startSample | The starting sample in this buffer | |
numberOfSamples | The number of samples to process | |
channel | The audio channel to merge |
bool | True if happened properly, false otherwise |
Definition at line 454 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
bool Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelToBuffer | ( | float * | buffer, | |
const unsigned long | startSample, | |||
const unsigned long | numberOfSamples, | |||
const unsigned long | channel | |||
) | [inline] |
Merge a channel to the passed audio buffer
buffer | The output audio buffer | |
startSample | The starting sample in this buffer | |
numberOfSamples | The number of samples to process | |
channel | The audio channel to merge |
bool | True if happened properly, false otherwise |
Definition at line 411 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
const TypeName* Exponent::Audio::TAudioBuffer< TypeName >::operator[] | ( | const long | index | ) | const [inline] |
Get a channel
index | The channel required |
const | TypeName* The buffer or NULL on error |
Definition at line 145 of file TAudioBuffer.hpp.
References Exponent::Audio::TAudioBuffer< TypeName >::getChannel().
void Exponent::Audio::TAudioBuffer< TypeName >::uninitialise | ( | ) | [inline] |
Clear and delete all buffers
Definition at line 110 of file TAudioBuffer.hpp.
References FREE_ARRAY_POINTER, Exponent::Audio::TAudioBuffer< TypeName >::m_buffer, Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize, Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels, and Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::initialise(), and Exponent::Audio::TAudioBuffer< TypeName >::~TAudioBuffer().
TypeName* Exponent::Audio::TAudioBuffer< TypeName >::m_buffer [protected] |
The actual audio data
Definition at line 488 of file TAudioBuffer.hpp.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::clearBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::copySamples(), Exponent::Audio::TAudioBuffer< TypeName >::denormal(), Exponent::Audio::TAudioBuffer< TypeName >::getChannel(), Exponent::Audio::TAudioBuffer< TypeName >::getData(), Exponent::Audio::TAudioBuffer< TypeName >::getMaximumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getMinimumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getMutableChannel(), Exponent::Audio::TAudioBuffer< TypeName >::getMutableData(), Exponent::Audio::TAudioBuffer< TypeName >::getRMSLevel(), Exponent::Audio::TAudioBuffer< TypeName >::initialise(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelsToMono(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelToBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::TAudioBuffer(), and Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().
unsigned long Exponent::Audio::TAudioBuffer< TypeName >::m_bufferSize [protected] |
Size of the buffer
Definition at line 491 of file TAudioBuffer.hpp.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::clearBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::denormal(), Exponent::Audio::TAudioBuffer< TypeName >::getBufferSize(), Exponent::Audio::TAudioBuffer< TypeName >::initialise(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelsToMono(), Exponent::Audio::TAudioBuffer< TypeName >::TAudioBuffer(), and Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().
unsigned long Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfChannels [protected] |
The number of channels
Definition at line 490 of file TAudioBuffer.hpp.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::copySamples(), Exponent::Audio::TAudioBuffer< TypeName >::getChannel(), Exponent::Audio::TAudioBuffer< TypeName >::getMaximumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getMinimumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getMutableChannel(), Exponent::Audio::TAudioBuffer< TypeName >::getNumberOfChannels(), Exponent::Audio::TAudioBuffer< TypeName >::getRMSLevel(), Exponent::Audio::TAudioBuffer< TypeName >::getSampleFrameSize(), Exponent::Audio::TAudioBuffer< TypeName >::initialise(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelsToMono(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelToBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::TAudioBuffer(), and Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().
unsigned long Exponent::Audio::TAudioBuffer< TypeName >::m_numberOfSamples [protected] |
The number of samples per channel
Definition at line 489 of file TAudioBuffer.hpp.
Referenced by Exponent::Audio::TAudioBuffer< TypeName >::copySamples(), Exponent::Audio::TAudioBuffer< TypeName >::getMaximumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getMinimumSample(), Exponent::Audio::TAudioBuffer< TypeName >::getNumberOfSamples(), Exponent::Audio::TAudioBuffer< TypeName >::getRMSLevel(), Exponent::Audio::TAudioBuffer< TypeName >::initialise(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelsToMono(), Exponent::Audio::TAudioBuffer< TypeName >::mergeChannelToBuffer(), Exponent::Audio::TAudioBuffer< TypeName >::TAudioBuffer(), and Exponent::Audio::TAudioBuffer< TypeName >::uninitialise().