MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

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 | ( |  | ) |
| override virtual

Closes the resampler.

After that, you may call Open() again.

Implements PcmResampler.

AudioFormat FallbackPcmResampler::Open | ( | AudioFormat & | af,
|  | unsigned | new_sample_rate
| ) |  |
| override virtual

Opens the resampler, preparing it for Resample().

Throws std::runtime_error on error.

Parameters

  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

Returns
  the format of outgoing data

Implements PcmResampler.

ConstBuffer<void> FallbackPcmResampler::Resample | ( | ConstBuffer< void > | src | ) |
| override virtual

Resamples a block of PCM data.

Parameters

  src | the 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:

- pcm/FallbackResampler.hxx