From d1e7b4e38136f9342aad76c685a13adf0e69f869 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 3 Aug 2013 21:00:50 +0200 Subject: audio_format: convert to C++ --- src/pcm/PcmVolume.cxx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/pcm/PcmVolume.cxx') 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 @@ -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; -- cgit v1.2.3