MPD 0.20.6

- Main Page
- Namespaces
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions
PcmVolume Class Reference

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

`#include <Volume.hxx>`

## Public Member Functions
| PcmVolume ()
unsigned | GetVolume () const
void | SetVolume (unsigned _volume)
void | Open (SampleFormat format)
| Opens the object, prepare for Apply(). More...
void | Close ()
| Closes the object. More...
gcc_pure ConstBuffer< void > | Apply (ConstBuffer< void > src)
| Apply the volume level. More...

## Detailed Description

A class that converts samples from one format to another.

Definition at line 63 of file Volume.hxx.

## Constructor & Destructor Documentation

PcmVolume::PcmVolume | ( |  | ) |
| inline

Definition at line 72 of file Volume.hxx.

## Member Function Documentation

gcc_pure ConstBuffer<void> PcmVolume::Apply | ( | ConstBuffer< void > | src | ) |

Apply the volume level.

void PcmVolume::Close | ( |  | ) |
| inline

Closes the object.

After that, you may call Open() again.

Definition at line 104 of file Volume.hxx.

unsigned PcmVolume::GetVolume | ( |  | ) | const
| inline

Definition at line 79 of file Volume.hxx.

void PcmVolume::Open | ( | SampleFormat | format | ) |

Opens the object, prepare for Apply().

Throws std::runtime_error on error.

Parameters

  format | the sample format

void PcmVolume::SetVolume | ( | unsigned | _volume | ) |
| inline

Parameters

  _volume | the volume level in the range [0..PCM_VOLUME_1]; may be bigger than PCM_VOLUME_1, but then it will most likely clip a lot

Definition at line 88 of file Volume.hxx.

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

- pcm/Volume.hxx