diff options
author | Max Kellermann <max@duempel.org> | 2013-01-31 20:33:26 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-31 21:11:06 +0100 |
commit | 1b175025fecb1c10e6719d4ab79c188d473fccc4 (patch) | |
tree | a1d04e92416e72c78f474de25c0aeee3374d47a1 /src/pcm_volume.c | |
parent | ccdf7184bea4bcc38ae468095ec400e2a2a4db3b (diff) | |
download | mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.tar.gz mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.tar.xz mpd-1b175025fecb1c10e6719d4ab79c188d473fccc4.zip |
pcm_*: convert to C++
Diffstat (limited to '')
-rw-r--r-- | src/PcmVolume.cxx (renamed from src/pcm_volume.c) | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/pcm_volume.c b/src/PcmVolume.cxx index 49c86026f..e19469f4a 100644 --- a/src/pcm_volume.c +++ b/src/PcmVolume.cxx @@ -18,8 +18,8 @@ */ #include "config.h" -#include "pcm_volume.h" -#include "pcm_utils.h" +#include "PcmVolume.hxx" +#include "PcmUtils.hxx" #include "audio_format.h" #include <glib.h> @@ -163,23 +163,27 @@ pcm_volume(void *buffer, size_t length, return false; case SAMPLE_FORMAT_S8: - pcm_volume_change_8(buffer, end, volume); + pcm_volume_change_8((int8_t *)buffer, (const int8_t *)end, + volume); return true; case SAMPLE_FORMAT_S16: - pcm_volume_change_16(buffer, end, volume); + pcm_volume_change_16((int16_t *)buffer, (const int16_t *)end, + volume); return true; case SAMPLE_FORMAT_S24_P32: - pcm_volume_change_24(buffer, end, volume); + pcm_volume_change_24((int32_t *)buffer, (const int32_t *)end, + volume); return true; case SAMPLE_FORMAT_S32: - pcm_volume_change_32(buffer, end, volume); + pcm_volume_change_32((int32_t *)buffer, (const int32_t *)end, + volume); return true; case SAMPLE_FORMAT_FLOAT: - pcm_volume_change_float(buffer, end, + pcm_volume_change_float((float *)buffer, (const float *)end, pcm_volume_to_float(volume)); return true; } |