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

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.

static float pcm_volume_to_float ( int  volume)
inlinestatic

Definition at line 55 of file Volume.hxx.

Variable Documentation

constexpr unsigned PCM_VOLUME_1 = 1024
static

This value means "100% volume".

Definition at line 41 of file Volume.hxx.

constexpr int PCM_VOLUME_1S = PCM_VOLUME_1
static

Definition at line 42 of file Volume.hxx.

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.