aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmVolume.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-03 21:00:50 +0200
committerMax Kellermann <max@duempel.org>2013-08-03 21:37:56 +0200
commitd1e7b4e38136f9342aad76c685a13adf0e69f869 (patch)
tree49643b937ddfe735511b566a71398da5a945d7aa /src/pcm/PcmVolume.cxx
parent67f591a9ce60651da41afc499bd9a22e25314e35 (diff)
downloadmpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.gz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.tar.xz
mpd-d1e7b4e38136f9342aad76c685a13adf0e69f869.zip
audio_format: convert to C++
Diffstat (limited to 'src/pcm/PcmVolume.cxx')
-rw-r--r--src/pcm/PcmVolume.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pcm/PcmVolume.cxx b/src/pcm/PcmVolume.cxx
index c22017ddd..2a8027400 100644
--- a/src/pcm/PcmVolume.cxx
+++ b/src/pcm/PcmVolume.cxx
@@ -20,7 +20,7 @@
#include "config.h"
#include "PcmVolume.hxx"
#include "PcmUtils.hxx"
-#include "audio_format.h"
+#include "AudioFormat.hxx"
#include <glib.h>
@@ -144,7 +144,7 @@ pcm_volume_change_float(float *buffer, const float *end, float volume)
bool
pcm_volume(void *buffer, size_t length,
- enum sample_format format,
+ SampleFormat format,
int volume)
{
if (volume == PCM_VOLUME_1)
@@ -157,32 +157,32 @@ pcm_volume(void *buffer, size_t length,
const void *end = pcm_end_pointer(buffer, length);
switch (format) {
- case SAMPLE_FORMAT_UNDEFINED:
- case SAMPLE_FORMAT_DSD:
+ case SampleFormat::UNDEFINED:
+ case SampleFormat::DSD:
/* not implemented */
return false;
- case SAMPLE_FORMAT_S8:
+ case SampleFormat::S8:
pcm_volume_change_8((int8_t *)buffer, (const int8_t *)end,
volume);
return true;
- case SAMPLE_FORMAT_S16:
+ case SampleFormat::S16:
pcm_volume_change_16((int16_t *)buffer, (const int16_t *)end,
volume);
return true;
- case SAMPLE_FORMAT_S24_P32:
+ case SampleFormat::S24_P32:
pcm_volume_change_24((int32_t *)buffer, (const int32_t *)end,
volume);
return true;
- case SAMPLE_FORMAT_S32:
+ case SampleFormat::S32:
pcm_volume_change_32((int32_t *)buffer, (const int32_t *)end,
volume);
return true;
- case SAMPLE_FORMAT_FLOAT:
+ case SampleFormat::FLOAT:
pcm_volume_change_float((float *)buffer, (const float *)end,
pcm_volume_to_float(volume));
return true;