Converts audio data stored in arrays between different audio formats.
More...
#include <AudioDataConverter.hpp>
|
static void | floatToShortInt (const float *inputBuffer, int16 *outputBuffer, const uint numberOfFrames) |
| Converts float buffer to int16 buffer.
|
|
static void | shortIntToFloat (const int16 *inputBuffer, float *outputBuffer, const uint numberOfFrames) |
| Converts int16 buffer to float buffer.
|
|
template<typename T > |
static void | interleave (const T **inputBuffers, T *outputBuffer, const uint numberOfChannels, const uint numberOfFrames) |
| Interleaves audio data from input buffers into output buffer.
|
|
template<typename T > |
static void | deinterleave (const T *inputBuffer, T **outputBuffers, const uint numberOfChannels, const uint numberOfFrames) |
| Deinterleaves audio data from input buffer into output buffers.
|
|
template<typename T > |
static void | multichannelToMono (const T **inputBuffers, T *outputBuffer, const uint numberOfChannels, const uint numberOfFrames, const bool normalize) |
| Mixes down multiple buffers into mono buffer accounting for headroom.
|
|
template<typename T > |
static void | multichannelToMonoInterleaved (const T *inputBuffer, T *outputBuffer, const uint numberOfChannels, const uint numberOfFrames, const bool normalize) |
| Mixes down interleaved buffer into mono buffer accounting for headroom.
|
|
static void | floatToInt (const float *inputBuffer, int *outputBuffer, size_t numberOfSamples) |
| Convert a float buffer to a signed 32-bit integer buffer.
|
|
static void | intToFloat (const int *inputBuffer, float *outputBuffer, size_t numberOfSamples) |
| Convert a signed 32-bit integer buffer to a float buffer.
|
|
Converts audio data stored in arrays between different audio formats.
AudioDataConverter class.
◆ deinterleave()
template<typename T >
template void switchboard::AudioDataConverter::deinterleave< float > |
( |
const T * |
inputBuffer, |
|
|
T ** |
outputBuffers, |
|
|
const uint |
numberOfChannels, |
|
|
const uint |
numberOfFrames |
|
) |
| |
|
static |
Deinterleaves audio data from input buffer into output buffers.
- Parameters
-
inputBuffer | The interleaved input audio array. |
outputBuffers | Output audio data arrays where the deinterleaved data will be stored. |
numberOfChannels | The number of channels to deinterleave. |
numberOfFrames | The number of frames in the input buffers. |
◆ floatToInt()
void switchboard::AudioDataConverter::floatToInt |
( |
const float * |
inputBuffer, |
|
|
int * |
outputBuffer, |
|
|
size_t |
numberOfSamples |
|
) |
| |
|
static |
Convert a float buffer to a signed 32-bit integer buffer.
- Parameters
-
inputBuffer | Input float buffer. |
outputBuffer | Output signed 32-bit integer buffer. |
numberOfSamples | Number of samples in the buffers. |
◆ floatToShortInt()
void switchboard::AudioDataConverter::floatToShortInt |
( |
const float * |
inputBuffer, |
|
|
int16 * |
outputBuffer, |
|
|
const uint |
numberOfFrames |
|
) |
| |
|
static |
Converts float buffer to int16 buffer.
Input and output buffers must be the same length.
- Parameters
-
inputBuffer | The float buffer that needs to be converted. |
outputBuffer | The int16 buffer that will store the converted data. |
numberOfFrames | Length of input and output buffers. |
◆ interleave()
template<typename T >
template void switchboard::AudioDataConverter::interleave< float > |
( |
const T ** |
inputBuffers, |
|
|
T * |
outputBuffer, |
|
|
const uint |
numberOfChannels, |
|
|
const uint |
numberOfFrames |
|
) |
| |
|
static |
Interleaves audio data from input buffers into output buffer.
Size of output buffer has to be at least numberOfChannels * numberOfFrames.
- Parameters
-
inputBuffers | Array of non-interleaved audio data arrays. |
outputBuffer | Output audio data array where the interleaved data will be stored. |
numberOfChannels | The number of channels to interleave. |
numberOfFrames | The number of frames in the input buffers. |
◆ intToFloat()
void switchboard::AudioDataConverter::intToFloat |
( |
const int * |
inputBuffer, |
|
|
float * |
outputBuffer, |
|
|
size_t |
numberOfSamples |
|
) |
| |
|
static |
Convert a signed 32-bit integer buffer to a float buffer.
- Parameters
-
inputBuffer | Input signed 32-bit integer buffer. |
outputBuffer | Output float buffer. |
numberOfSamples | Number of samples in the buffers. |
◆ multichannelToMono()
template<typename T >
template void switchboard::AudioDataConverter::multichannelToMono< float > |
( |
const T ** |
inputBuffers, |
|
|
T * |
outputBuffer, |
|
|
const uint |
numberOfChannels, |
|
|
const uint |
numberOfFrames, |
|
|
const bool |
normalize |
|
) |
| |
|
static |
Mixes down multiple buffers into mono buffer accounting for headroom.
- Parameters
-
inputBuffers | Array of non-interleaved audio data arrays. |
outputBuffer | Output audio data array where the mixed data will be stored. |
numberOfChannels | The number of channels to mix. |
numberOfFrames | The number of frames in the input buffers. |
normalize | True if the signals have to be normalized to the largest signal after mixing. |
◆ multichannelToMonoInterleaved()
template<typename T >
template void switchboard::AudioDataConverter::multichannelToMonoInterleaved< float > |
( |
const T * |
inputBuffer, |
|
|
T * |
outputBuffer, |
|
|
const uint |
numberOfChannels, |
|
|
const uint |
numberOfFrames, |
|
|
const bool |
normalize |
|
) |
| |
|
static |
Mixes down interleaved buffer into mono buffer accounting for headroom.
- Parameters
-
inputBuffer | Interleaved audio data array. |
outputBuffer | Output audio data array where the mixed data will be stored. |
numberOfChannels | The number of channels to mix. |
numberOfFrames | The number of frames in the input buffers. |
normalize | True if the signals have to be normalized to the largest signal after mixing. |
◆ shortIntToFloat()
void switchboard::AudioDataConverter::shortIntToFloat |
( |
const int16 * |
inputBuffer, |
|
|
float * |
outputBuffer, |
|
|
const uint |
numberOfFrames |
|
) |
| |
|
static |
Converts int16 buffer to float buffer.
Input and output buffers must be the same length.
- Parameters
-
inputBuffer | The int16 buffer that needs to be converted. |
outputBuffer | The float buffer that will store the converted data. |
numberOfFrames | Length of input and output buffers. |
The documentation for this class was generated from the following files:
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/AudioData/AudioDataConverter.hpp
- /Users/jenkins/.jenkins/workspace/Switchboard Developer Site - Production/SwitchboardSDK/src/all/AudioData/AudioDataConverter.cpp