aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/pcm/PcmResample.cxx6
-rw-r--r--src/pcm/PcmResampleFallback.cxx8
-rw-r--r--src/pcm/PcmResampleInternal.hxx4
3 files changed, 9 insertions, 9 deletions
diff --git a/src/pcm/PcmResample.cxx b/src/pcm/PcmResample.cxx
index e2ce095d1..318181e15 100644
--- a/src/pcm/PcmResample.cxx
+++ b/src/pcm/PcmResample.cxx
@@ -101,7 +101,7 @@ PcmResampler::ResampleFloat(unsigned channels, unsigned src_rate,
not do any math on the sample values, so this hack is
possible: */
return (const float *)
- pcm_resample_fallback_32(this, channels,
+ pcm_resample_fallback_32(buffer, channels,
src_rate, (const int32_t *)src_buffer,
src_size,
dest_rate, dest_size_r);
@@ -123,7 +123,7 @@ PcmResampler::Resample16(unsigned channels,
(void)error_r;
#endif
- return pcm_resample_fallback_16(this, channels,
+ return pcm_resample_fallback_16(buffer, channels,
src_rate, src_buffer, src_size,
dest_rate, dest_size_r);
}
@@ -144,7 +144,7 @@ PcmResampler::Resample32(unsigned channels, unsigned src_rate,
(void)error_r;
#endif
- return pcm_resample_fallback_32(this, channels,
+ return pcm_resample_fallback_32(buffer, channels,
src_rate, src_buffer, src_size,
dest_rate, dest_size_r);
}
diff --git a/src/pcm/PcmResampleFallback.cxx b/src/pcm/PcmResampleFallback.cxx
index a62cd64f7..ca92e5a83 100644
--- a/src/pcm/PcmResampleFallback.cxx
+++ b/src/pcm/PcmResampleFallback.cxx
@@ -24,7 +24,7 @@
/* resampling code blatantly ripped from ESD */
const int16_t *
-pcm_resample_fallback_16(PcmResampler *state,
+pcm_resample_fallback_16(PcmBuffer &buffer,
unsigned channels,
unsigned src_rate,
const int16_t *src_buffer, size_t src_size,
@@ -37,7 +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 *)state->buffer.Get(dest_size);
+ int16_t *dest_buffer = (int16_t *)buffer.Get(dest_size);
assert((src_size % (sizeof(*src_buffer) * channels)) == 0);
@@ -65,7 +65,7 @@ pcm_resample_fallback_16(PcmResampler *state,
}
const int32_t *
-pcm_resample_fallback_32(PcmResampler *state,
+pcm_resample_fallback_32(PcmBuffer &buffer,
unsigned channels,
unsigned src_rate,
const int32_t *src_buffer, size_t src_size,
@@ -78,7 +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 *)state->buffer.Get(dest_size);
+ int32_t *dest_buffer = (int32_t *)buffer.Get(dest_size);
assert((src_size % (sizeof(*src_buffer) * channels)) == 0);
diff --git a/src/pcm/PcmResampleInternal.hxx b/src/pcm/PcmResampleInternal.hxx
index 59bb2f5df..4219b22ed 100644
--- a/src/pcm/PcmResampleInternal.hxx
+++ b/src/pcm/PcmResampleInternal.hxx
@@ -72,7 +72,7 @@ pcm_resample_lsr_32(PcmResampler *state,
#endif
const int16_t *
-pcm_resample_fallback_16(PcmResampler *state,
+pcm_resample_fallback_16(PcmBuffer &buffer,
unsigned channels,
unsigned src_rate,
const int16_t *src_buffer, size_t src_size,
@@ -80,7 +80,7 @@ pcm_resample_fallback_16(PcmResampler *state,
size_t *dest_size_r);
const int32_t *
-pcm_resample_fallback_32(PcmResampler *state,
+pcm_resample_fallback_32(PcmBuffer &buffer,
unsigned channels,
unsigned src_rate,
const int32_t *src_buffer,