MPD
0.20.6
|
This is an interface for plugins that convert PCM data to a specific sample rate. More...
#include <Resampler.hxx>
Public Member Functions | |
virtual | ~PcmResampler () |
virtual AudioFormat | Open (AudioFormat &af, unsigned new_sample_rate)=0 |
Opens the resampler, preparing it for Resample(). More... | |
virtual void | Close ()=0 |
Closes the resampler. More... | |
virtual void | Reset () |
Reset the filter's state, e.g. More... | |
virtual gcc_pure ConstBuffer< void > | Resample (ConstBuffer< void > src)=0 |
Resamples a block of PCM data. More... | |
This is an interface for plugins that convert PCM data to a specific sample rate.
Definition at line 32 of file Resampler.hxx.
|
inlinevirtual |
Definition at line 34 of file Resampler.hxx.
|
pure virtual |
Closes the resampler.
After that, you may call Open() again.
Implemented in LibsampleratePcmResampler, SoxrPcmResampler, and FallbackPcmResampler.
|
pure virtual |
Opens the resampler, preparing it for Resample().
Throws std::runtime_error on error.
af | the audio format of incoming data; the plugin may modify the object to enforce another input format (however, it may not request a different input sample rate) |
new_sample_rate | the requested output sample rate |
error | location to store the error |
Implemented in LibsampleratePcmResampler, SoxrPcmResampler, and FallbackPcmResampler.
|
pure virtual |
Resamples a block of PCM data.
src | the input buffer |
Implemented in LibsampleratePcmResampler, SoxrPcmResampler, and FallbackPcmResampler.
|
inlinevirtual |
Reset the filter's state, e.g.
drop/flush buffers.
Reimplemented in LibsampleratePcmResampler.
Definition at line 60 of file Resampler.hxx.