aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm/PcmResampleFallback.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-07-29 08:10:10 +0200
committerMax Kellermann <max@duempel.org>2013-07-30 08:31:02 +0200
commitc75cb67c4406648314ce2a15daf8b632374d7913 (patch)
tree5e27b73f2c90e878631bfac5b60070505b094717 /src/pcm/PcmResampleFallback.cxx
parentcd1bb2bafa2653e5d4c7c9abf6f464bcdec693c5 (diff)
downloadmpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.gz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.tar.xz
mpd-c75cb67c4406648314ce2a15daf8b632374d7913.zip
pcm_buffer: convert to C++
Diffstat (limited to 'src/pcm/PcmResampleFallback.cxx')
-rw-r--r--src/pcm/PcmResampleFallback.cxx18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/pcm/PcmResampleFallback.cxx b/src/pcm/PcmResampleFallback.cxx
index 724894366..a62cd64f7 100644
--- a/src/pcm/PcmResampleFallback.cxx
+++ b/src/pcm/PcmResampleFallback.cxx
@@ -22,18 +22,6 @@
#include <assert.h>
-void
-pcm_resample_fallback_init(PcmResampler *state)
-{
- pcm_buffer_init(&state->buffer);
-}
-
-void
-pcm_resample_fallback_deinit(PcmResampler *state)
-{
- pcm_buffer_deinit(&state->buffer);
-}
-
/* resampling code blatantly ripped from ESD */
const int16_t *
pcm_resample_fallback_16(PcmResampler *state,
@@ -49,8 +37,7 @@ pcm_resample_fallback_16(PcmResampler *state,
(src_frames * dest_rate + src_rate - 1) / src_rate;
unsigned dest_samples = dest_frames * channels;
size_t dest_size = dest_samples * sizeof(*src_buffer);
- int16_t *dest_buffer = (int16_t *)
- pcm_buffer_get(&state->buffer, dest_size);
+ int16_t *dest_buffer = (int16_t *)state->buffer.Get(dest_size);
assert((src_size % (sizeof(*src_buffer) * channels)) == 0);
@@ -91,8 +78,7 @@ pcm_resample_fallback_32(PcmResampler *state,
(src_frames * dest_rate + src_rate - 1) / src_rate;
unsigned dest_samples = dest_frames * channels;
size_t dest_size = dest_samples * sizeof(*src_buffer);
- int32_t *dest_buffer = (int32_t *)
- pcm_buffer_get(&state->buffer, dest_size);
+ int32_t *dest_buffer = (int32_t *)state->buffer.Get(dest_size);
assert((src_size % (sizeof(*src_buffer) * channels)) == 0);