MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
PcmConvert Class Reference

This object is statically allocated (within another struct), and holds buffer allocations and the state for all kinds of PCM conversions. More...

`#include <PcmConvert.hxx>`

## Public Member Functions
| PcmConvert ()
| ~PcmConvert ()
void | Open (AudioFormat _src_format, AudioFormat _dest_format)
| Prepare the object. More...
void | Close ()
| Close the object after it was prepared with Open(). More...
void | Reset ()
| Reset the filter's state, e.g. More...
ConstBuffer< void > | Convert (ConstBuffer< void > src)
| Converts PCM data between two audio formats. More...

## Detailed Description

This object is statically allocated (within another struct), and holds buffer allocations and the state for all kinds of PCM conversions.

Definition at line 40 of file PcmConvert.hxx.

## Constructor & Destructor Documentation

PcmConvert::PcmConvert | ( |  | ) |

PcmConvert::~PcmConvert | ( |  | ) |

## Member Function Documentation

void PcmConvert::Close | ( |  | ) |

Close the object after it was prepared with Open().

After that, it may be reused by calling Open() again.

ConstBuffer<void> PcmConvert::Convert | ( | ConstBuffer< void > | src | ) |

Converts PCM data between two audio formats.

Throws std::runtime_error on error.

Parameters

  src | the source PCM buffer

Returns
  the destination buffer

void PcmConvert::Open | ( | AudioFormat | _src_format,
|  | AudioFormat | _dest_format
| ) |  |

Prepare the object.

Call Close() when done.

Throws std::runtime_error on error.

void PcmConvert::Reset | ( |  | ) |

Reset the filter's state, e.g.

drop/flush buffers.

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

- pcm/PcmConvert.hxx