#include "pcm_prng.h"#include <stdint.h>#include <stdbool.h>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 int | pcm_volume_dither (void) |
| Returns the next volume dithering number, between -511 and +511. | |
| bool | pcm_volume (void *buffer, int length, const struct audio_format *format, int volume) |
| Adjust the volume of the specified PCM buffer. | |
| anonymous enum |
| 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 40 of file pcm_volume.h.
| bool pcm_volume | ( | void * | buffer, | |
| int | length, | |||
| const struct audio_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 audio 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 50 of file pcm_volume.h.
1.5.9