MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Data Structures | Public Member Functions
PcmExport Class Reference

An object that handles export of PCM samples to some instance outside of MPD. More...

`#include <PcmExport.hxx>`

## Data Structures
struct | Params

## Public Member Functions
void | Open (SampleFormat sample_format, unsigned channels, Params params)
| Open the object. More...
void | Reset ()
| Reset the filter's state, e.g. More...
gcc_pure size_t | GetFrameSize (const AudioFormat &audio_format) const
| Calculate the size of one output frame. More...
ConstBuffer< void > | Export (ConstBuffer< void > src)
| Export a PCM buffer. More...
gcc_pure size_t | CalcSourceSize (size_t dest_size) const
| Converts the number of consumed bytes from the pcm_export() destination buffer to the according number of bytes from the pcm_export() source buffer. More...

## Detailed Description

An object that handles export of PCM samples to some instance outside of MPD.

It has a few more options to tweak the binary representation which are not supported by the pcm_convert library.

Definition at line 35 of file PcmExport.hxx.

## Member Function Documentation

gcc_pure size_t PcmExport::CalcSourceSize | ( | size_t | dest_size | ) | const

Converts the number of consumed bytes from the pcm_export() destination buffer to the according number of bytes from the pcm_export() source buffer.

ConstBuffer<void> PcmExport::Export | ( | ConstBuffer< void > | src | ) |

Export a PCM buffer.

Parameters

  src | the source PCM buffer

Returns
  the destination buffer (may be a pointer to the source buffer)

gcc_pure size_t PcmExport::GetFrameSize | ( | const AudioFormat & | audio_format | ) | const

Calculate the size of one output frame.

void PcmExport::Open | ( | SampleFormat | sample_format,
|  | unsigned | channels,
|  | Params | params
| ) |  |

Open the object.

There is no "close" method. This function may be called multiple times to reuse the object.

This function cannot fail.

Parameters

  channels | the number of channels; ignored unless dop is set

void PcmExport::Reset | ( |  | ) |
| inline

Reset the filter's state, e.g.

drop/flush buffers.

Definition at line 163 of file PcmExport.hxx.

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

- pcm/PcmExport.hxx