Helpers to convert audio (C++)
More...
|
void | sound4::CProcessor::AudioConvertFrom (const uint8_t *payload, float *output, size_t nSpl, SampleFormat fmt) |
|
void | sound4::CProcessor::AudioConvertTo (const float *input, uint8_t *payload, size_t nSpl, SampleFormat fmt) |
|
void | sound4::CProcessor::StereoToMono (const float *input, float *output, size_t nFrame) |
|
void | sound4::CProcessor::MonoToStereo (const float *input, float *output, size_t nFrame) |
|
void | sound4::CProcessor::StereoToMono_Planar (const float *inputL, const float *inputR, float *output, size_t nFrame) |
|
void | sound4::CProcessor::MonoToStereo_Planar (const float *input, float *outputL, float *outputR, size_t nFrame) |
|
void | sound4::CProcessor::AudioMonoFromLiveStereo (const uint8_t *payload, float *output) |
|
void | sound4::CProcessor::AudioMonoToLiveStereo (const float *input, uint8_t *payload) |
|
Helpers to convert audio in an optimized way
◆ AudioConvertFrom()
void sound4::CProcessor::AudioConvertFrom |
( |
const uint8_t * |
payload, |
|
|
float * |
output, |
|
|
size_t |
nSpl, |
|
|
SampleFormat |
fmt |
|
) |
| |
|
inline |
Convert the payload to floating-point array
- Warning
- Output buffer must be 64-byte aligned
- Parameters
-
payload | the binary raw audio buffer |
output | audio output buffer (64 byte aligned) |
nSpl | the number of samples (not frames) |
fmt | the format of the payload |
Definition at line 610 of file sound4cl.hpp.
◆ AudioConvertTo()
void sound4::CProcessor::AudioConvertTo |
( |
const float * |
input, |
|
|
uint8_t * |
payload, |
|
|
size_t |
nSpl, |
|
|
SampleFormat |
fmt |
|
) |
| |
|
inline |
Convert floating-point array to payload
- Warning
- Input buffer must be 64-byte aligned
- Parameters
-
input | audio input buffer (64 byte aligned) |
payload | the binary raw audio buffer |
nSpl | the number of samples (not frames) |
fmt | the format of the payload |
Definition at line 623 of file sound4cl.hpp.
◆ AudioMonoFromLiveStereo()
void sound4::CProcessor::AudioMonoFromLiveStereo |
( |
const uint8_t * |
payload, |
|
|
float * |
output |
|
) |
| |
|
inline |
Convert Livewire Livestereo payload to floating-point Mono (12 samples)
- Parameters
-
payload | Livewire Live Stereo raw buffer |
output | audio output mono buffer (64 byte aligned) |
Definition at line 682 of file sound4cl.hpp.
◆ AudioMonoToLiveStereo()
void sound4::CProcessor::AudioMonoToLiveStereo |
( |
const float * |
input, |
|
|
uint8_t * |
payload |
|
) |
| |
|
inline |
Convert floating-point Mono (12 samples) to Livewire Livestereo payload
- Parameters
-
input | audio input mono buffer (64 byte aligned) |
payload | Livewire Live Stereo raw buffer |
Definition at line 691 of file sound4cl.hpp.
◆ MonoToStereo()
void sound4::CProcessor::MonoToStereo |
( |
const float * |
input, |
|
|
float * |
output, |
|
|
size_t |
nFrame |
|
) |
| |
|
inline |
Convert floating-point Mono to Stereo (L,L)
- Warning
- Buffers must be 64-byte aligned
- Parameters
-
input | audio input mono buffer (64 byte aligned) |
output | audio output stereo buffer (64 byte aligned) |
nFrame | the number of frames |
Definition at line 647 of file sound4cl.hpp.
◆ MonoToStereo_Planar()
void sound4::CProcessor::MonoToStereo_Planar |
( |
const float * |
input, |
|
|
float * |
outputL, |
|
|
float * |
outputR, |
|
|
size_t |
nFrame |
|
) |
| |
|
inline |
Convert floating-point Mono to Stereo (planar) (L,L)
- Warning
- Buffers must be 64-byte aligned
- Parameters
-
input | audio input mono buffer (64 byte aligned) |
outputL | audio output left buffer (64 byte aligned) |
outputR | audio output right buffer (64 byte aligned) |
nFrame | the number of frames |
Definition at line 673 of file sound4cl.hpp.
◆ StereoToMono()
void sound4::CProcessor::StereoToMono |
( |
const float * |
input, |
|
|
float * |
output, |
|
|
size_t |
nFrame |
|
) |
| |
|
inline |
Convert floating-point Stereo to Mono (L+R)/2
- Warning
- Buffers must be 64-byte aligned
- Parameters
-
input | audio input stereo buffer (64 byte aligned) |
output | audio output mono buffer (64 byte aligned) |
nFrame | the number of frames |
Definition at line 635 of file sound4cl.hpp.
◆ StereoToMono_Planar()
void sound4::CProcessor::StereoToMono_Planar |
( |
const float * |
inputL, |
|
|
const float * |
inputR, |
|
|
float * |
output, |
|
|
size_t |
nFrame |
|
) |
| |
|
inline |
Convert floating-point Stereo (planar) to Mono (L+R)/2
- Warning
- Buffers must be 64-byte aligned
- Parameters
-
inputL | audio input left buffer (64 byte aligned) |
inputR | audio input right buffer (64 byte aligned) |
output | audio output mono buffer (64 byte aligned) |
nFrame | the number of frames |
Definition at line 660 of file sound4cl.hpp.