MPD
0.20.6
|
A class that converts samples from one format to another. More...
#include <FormatConverter.hxx>
Public Member Functions | |
PcmFormatConverter () | |
~PcmFormatConverter () | |
void | Open (SampleFormat src_format, SampleFormat dest_format) |
Opens the object, prepare for Convert(). More... | |
void | Close () |
Closes the object. More... | |
gcc_pure ConstBuffer< void > | Convert (ConstBuffer< void > src) |
Convert a block of PCM data. More... | |
A class that converts samples from one format to another.
Definition at line 37 of file FormatConverter.hxx.
|
inline |
Definition at line 45 of file FormatConverter.hxx.
|
inline |
Definition at line 49 of file FormatConverter.hxx.
void PcmFormatConverter::Close | ( | ) |
Closes the object.
After that, you may call Open() again.
gcc_pure ConstBuffer<void> PcmFormatConverter::Convert | ( | ConstBuffer< void > | src | ) |
Convert a block of PCM data.
Throws std::runtime_error on error.
src | the input buffer |
void PcmFormatConverter::Open | ( | SampleFormat | src_format, |
SampleFormat | dest_format | ||
) |
Opens the object, prepare for Convert().
Throws std::runtime_error on error.
src_format | the sample format of incoming data |
dest_format | the sample format of outgoing data |