MPD: pcm/Volume.hxx File Reference

MPD 0.20.18

Data Structures | Functions | Variables
Volume.hxx File Reference
`#include "SampleFormat.hxx"`
`#include "PcmBuffer.hxx"`
`#include "PcmDither.hxx"`
`#include <assert.h>`
Include dependency graph for Volume.hxx:

Go to the source code of this file.

## Data Structures
struct | ConstBuffer< T >
| A reference to a memory area that is read-only. More...
class | PcmVolume
| A class that converts samples from one format to another. More...

## Functions
static int | pcm_float_to_volume (float volume)
| Converts a float value (0.0 = silence, 1.0 = 100% volume) to an integer volume value (1000 = 100%). More...
static float | pcm_volume_to_float (int volume)

## Variables
static constexpr unsigned | PCM_VOLUME_BITS = 10
| Number of fractional bits for a fixed-point volume value. More...
static constexpr unsigned | PCM_VOLUME_1 = 1024
| This value means "100% volume". More...
static constexpr int | PCM_VOLUME_1S = PCM_VOLUME_1

## Function Documentation

## ◆ pcm_float_to_volume()

static int pcm_float_to_volume | ( | float | volume | ) |
| inlinestatic

Converts a float value (0.0 = silence, 1.0 = 100% volume) to an integer volume value (1000 = 100%).

Definition at line 49 of file Volume.hxx.

## ◆ pcm_volume_to_float()

static float pcm_volume_to_float | ( | int | volume | ) |
| inlinestatic

Definition at line 55 of file Volume.hxx.

## Variable Documentation

## ◆ PCM_VOLUME_1

constexpr unsigned PCM_VOLUME_1 = 1024
| static

This value means "100% volume".

Definition at line 41 of file Volume.hxx.

## ◆ PCM_VOLUME_1S

constexpr int PCM_VOLUME_1S = PCM_VOLUME_1
| static

Definition at line 42 of file Volume.hxx.

## ◆ PCM_VOLUME_BITS

constexpr unsigned PCM_VOLUME_BITS = 10
| static

Number of fractional bits for a fixed-point volume value.

Definition at line 36 of file Volume.hxx.