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_mix.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/PcmMix.cxx (renamed from src/pcm_mix.c) | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/pcm_mix.c b/src/PcmMix.cxx index 6c6d1b4ab..4f8f3882c 100644 --- a/src/pcm_mix.c +++ b/src/PcmMix.cxx @@ -18,18 +18,13 @@ */ #include "config.h" -#include "pcm_mix.h" -#include "pcm_volume.h" -#include "pcm_utils.h" +#include "PcmMix.hxx" +#include "PcmVolume.hxx" +#include "PcmUtils.hxx" #include "audio_format.h" -#include <glib.h> - #include <math.h> -#undef G_LOG_DOMAIN -#define G_LOG_DOMAIN "pcm" - static void pcm_add_vol_8(int8_t *buffer1, const int8_t *buffer2, unsigned num_samples, int volume1, int volume2) @@ -144,7 +139,8 @@ pcm_add_vol(void *buffer1, const void *buffer2, size_t size, return true; case SAMPLE_FORMAT_FLOAT: - pcm_add_vol_float(buffer1, buffer2, size / 4, + pcm_add_vol_float((float *)buffer1, (const float *)buffer2, + size / 4, pcm_volume_to_float(vol1), pcm_volume_to_float(vol2)); return true; @@ -249,7 +245,8 @@ pcm_add(void *buffer1, const void *buffer2, size_t size, return true; case SAMPLE_FORMAT_FLOAT: - pcm_add_float(buffer1, buffer2, size / 4); + pcm_add_float((float *)buffer1, (const float *)buffer2, + size / 4); return true; } |