MPD
0.20.18
|
An object that handles export of PCM samples to some instance outside of MPD. More...
#include <PcmExport.hxx>
Data Structures | |
struct | Params |
Public Member Functions | |
void | Open (SampleFormat sample_format, unsigned channels, Params params) |
Open the object. More... | |
void | Reset () |
Reset the filter's state, e.g. More... | |
gcc_pure size_t | GetFrameSize (const AudioFormat &audio_format) const noexcept |
Calculate the size of one output frame. More... | |
ConstBuffer< void > | Export (ConstBuffer< void > src) |
Export a PCM buffer. More... | |
gcc_pure size_t | CalcSourceSize (size_t dest_size) const noexcept |
Converts the number of consumed bytes from the pcm_export() destination buffer to the according number of bytes from the pcm_export() source buffer. More... | |
An object that handles export of PCM samples to some instance outside of MPD.
It has a few more options to tweak the binary representation which are not supported by the pcm_convert library.
Definition at line 35 of file PcmExport.hxx.
|
noexcept |
Converts the number of consumed bytes from the pcm_export() destination buffer to the according number of bytes from the pcm_export() source buffer.
ConstBuffer<void> PcmExport::Export | ( | ConstBuffer< void > | src | ) |
Export a PCM buffer.
src | the source PCM buffer |
|
noexcept |
Calculate the size of one output frame.
void PcmExport::Open | ( | SampleFormat | sample_format, |
unsigned | channels, | ||
Params | params | ||
) |
Open the object.
There is no "close" method. This function may be called multiple times to reuse the object.
This function cannot fail.
channels | the number of channels; ignored unless dop is set |
|
inline |