MPD: PcmConvert Class Reference

MPD 0.20.18

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

PcmConvert::~PcmConvert | ( |  | ) |

## Member Function Documentation

## ◆ Close()

void PcmConvert::Close | ( |  | ) |

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

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

## ◆ Convert()

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

## ◆ Open()

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

Prepare the object.

Call Close() when done.

Throws std::runtime_error on error.

## ◆ Reset()

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