MPD 0.17~git
|
Go to the source code of this file.
Enumerations | |
enum | { PCM_VOLUME_1 = 1024 } |
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%). | |
static float | pcm_volume_to_float (int volume) |
static int | pcm_volume_dither (void) |
Returns the next volume dithering number, between -511 and +511. | |
bool | pcm_volume (void *buffer, size_t length, enum sample_format format, int volume) |
Adjust the volume of the specified PCM buffer. |
anonymous enum |
Definition at line 29 of file pcm_volume.h.
static int pcm_float_to_volume | ( | float | volume | ) | [inline, static] |
Converts a float value (0.0 = silence, 1.0 = 100% volume) to an integer volume value (1000 = 100%).
Definition at line 41 of file pcm_volume.h.
bool pcm_volume | ( | void * | buffer, |
size_t | length, | ||
enum sample_format | format, | ||
int | volume | ||
) |
Adjust the volume of the specified PCM buffer.
buffer | the PCM buffer |
length | the length of the PCM buffer |
format | the sample format of the PCM buffer |
volume | the volume between 0 and PCM_VOLUME_1 |
static int pcm_volume_dither | ( | void | ) | [inline, static] |
Returns the next volume dithering number, between -511 and +511.
This number is taken from a global PRNG, see pcm_prng().
Definition at line 57 of file pcm_volume.h.
static float pcm_volume_to_float | ( | int | volume | ) | [inline, static] |
Definition at line 47 of file pcm_volume.h.