20 #ifndef MPD_PCM_VOLUME_HXX
21 #define MPD_PCM_VOLUME_HXX
static float pcm_volume_to_float(int volume)
static constexpr unsigned PCM_VOLUME_1
This value means "100% volume".
A class that converts samples from one format to another.
void Open(SampleFormat format)
Opens the object, prepare for Apply().
void SetVolume(unsigned _volume)
unsigned GetVolume() const
static constexpr unsigned PCM_VOLUME_BITS
Number of fractional bits for a fixed-point volume value.
static constexpr int PCM_VOLUME_1S
Manager for a temporary buffer which grows as needed.
A reference to a memory area that is read-only.
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%)...
void Close()
Closes the object.
gcc_pure ConstBuffer< void > Apply(ConstBuffer< void > src)
Apply the volume level.