Audio converter helper.
More...
#include <sound4cl.hpp>
This helps to extract/insert a subset of channels from/to the payload, and convert it to floating-point format.
Definition at line 1586 of file sound4cl.hpp.
◆ CAudioConverter()
| sound4::CAudioConverter::CAudioConverter |
( |
CProcessor & |
dynlib | ) |
|
|
inline |
- Parameters
-
| dynlib | the processor dynamic library |
Definition at line 1593 of file sound4cl.hpp.
◆ ~CAudioConverter()
| virtual sound4::CAudioConverter::~CAudioConverter |
( |
| ) |
|
|
inlinevirtual |
◆ Configure()
Configure the converter.
The floating-point channels count depends on target_mode. It can be the same as payload, or fixed to mono or stereo.
- Parameters
-
| fmt | the format of the payload |
| nFrame | the number of frames per packet |
| payl_ch | the number of channels in the payload |
| payl_ch_offset | the offset of the first channel to extract/insert in the payload [must be <= (payload_channels-output_channels)] |
| target_mode | defines the number of channels in process, and the number of channels to extract from payload for mono<->stereo conversion |
- Returns
- true if was created
- Note
- The converter is not multithread-safe, it uses internal cache buffers.
Definition at line 1620 of file sound4cl.hpp.
◆ ConvertFrom()
| void sound4::CAudioConverter::ConvertFrom |
( |
const uint8_t * |
payload, |
|
|
float * |
output |
|
) |
| |
|
inline |
Convert the payload to floating-point array, using a predefined converter.
- Warning
- Output buffer must be 64-byte aligned
- Parameters
-
| payload | the binary raw audio buffer |
| output | audio output buffer (64 byte aligned) |
Definition at line 1644 of file sound4cl.hpp.
◆ ConvertTo()
| void sound4::CAudioConverter::ConvertTo |
( |
const float * |
input, |
|
|
uint8_t * |
payload |
|
) |
| |
|
inline |
Convert floating-point array to payload, using a predefined converter.
- Warning
- Input buffer must be 64-byte aligned
- Parameters
-
| input | audio input buffer (64 byte aligned) |
| payload | the binary raw audio buffer |
Definition at line 1655 of file sound4cl.hpp.
◆ Delete()
| void sound4::CAudioConverter::Delete |
( |
| ) |
|
|
inline |
◆ IsOK()
| bool sound4::CAudioConverter::IsOK |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: