MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
PcmChannelsConverter Class Reference

A class that converts samples from one format to another. More...

`#include <ChannelsConverter.hxx>`

## Public Member Functions
| PcmChannelsConverter ()
| ~PcmChannelsConverter ()
void | Open (SampleFormat format, unsigned src_channels, unsigned dest_channels)
| Opens the object, prepare for Convert(). More...
void | Close ()
| Closes the object. More...
gcc_pure ConstBuffer< void > | Convert (ConstBuffer< void > src)
| Convert a block of PCM data. More...

## Detailed Description

A class that converts samples from one format to another.

Definition at line 36 of file ChannelsConverter.hxx.

## Constructor & Destructor Documentation

PcmChannelsConverter::PcmChannelsConverter | ( |  | ) |
| inline

Definition at line 44 of file ChannelsConverter.hxx.

PcmChannelsConverter::~PcmChannelsConverter | ( |  | ) |
| inline

Definition at line 47 of file ChannelsConverter.hxx.

## Member Function Documentation

void PcmChannelsConverter::Close | ( |  | ) |

Closes the object.

After that, you may call Open() again.

gcc_pure ConstBuffer<void> PcmChannelsConverter::Convert | ( | ConstBuffer< void > | src | ) |

Convert a block of PCM data.

Throws std::runtime_error on error.

Parameters

  src | the input buffer

Returns
  the destination buffer

void PcmChannelsConverter::Open | ( | SampleFormat | format,
|  | unsigned | src_channels,
|  | unsigned | dest_channels
| ) |  |

Opens the object, prepare for Convert().

Throws std::runtime_error on error.

Parameters

  format | the sample format
  src_channels | the number of source channels
  dest_channels | the number of destination channels

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

- pcm/ChannelsConverter.hxx