MPD  0.20.18
Public Member Functions
FallbackPcmResampler Class Referencefinal

A naive resampler that is used when no external library was found (or when the user explicitly asks for bad quality). More...

#include <FallbackResampler.hxx>

Inheritance diagram for FallbackPcmResampler:
[legend]
Collaboration diagram for FallbackPcmResampler:
[legend]

Public Member Functions

AudioFormat Open (AudioFormat &af, unsigned new_sample_rate) override
 Opens the resampler, preparing it for Resample(). More...
 
void Close () override
 Closes the resampler. More...
 
ConstBuffer< void > Resample (ConstBuffer< void > src) override
 Resamples a block of PCM data. More...
 
- Public Member Functions inherited from PcmResampler
virtual ~PcmResampler ()
 
virtual void Reset ()
 Reset the filter's state, e.g. More...
 

Detailed Description

A naive resampler that is used when no external library was found (or when the user explicitly asks for bad quality).

Definition at line 32 of file FallbackResampler.hxx.

Member Function Documentation

void FallbackPcmResampler::Close ( )
overridevirtual

Closes the resampler.

After that, you may call Open() again.

Implements PcmResampler.

AudioFormat FallbackPcmResampler::Open ( AudioFormat af,
unsigned  new_sample_rate 
)
overridevirtual

Opens the resampler, preparing it for Resample().

Throws std::runtime_error on error.

Parameters
afthe 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_ratethe requested output sample rate
errorlocation to store the error
Returns
the format of outgoing data

Implements PcmResampler.

ConstBuffer<void> FallbackPcmResampler::Resample ( ConstBuffer< void >  src)
overridevirtual

Resamples a block of PCM data.

Throws std::runtime_error on error.

Parameters
srcthe input buffer
Returns
the destination buffer (will be invalidated by filter_close() or filter_filter())

Implements PcmResampler.


The documentation for this class was generated from the following file: