summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuo Jinghua <sunmoon1997@gmail.com>2010-10-19 11:49:54 +0800
committerLuo Jinghua <sunmoon1997@gmail.com>2010-10-19 11:49:54 +0800
commit21b23522775195493dfe48266f4e2d0a4fe0046e (patch)
tree1bc1471497ab450362545e2344dbbb6c2e270ea7 /src
parentdd001e7dbcd43e40299f90a57a3a53cc4eda5cc4 (diff)
use the optimized version of dumb_resample
Diffstat (limited to 'src')
-rw-r--r--src/resampler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/resampler.cpp b/src/resampler.cpp
index 2471e10..2a1c5e7 100644
--- a/src/resampler.cpp
+++ b/src/resampler.cpp
@@ -41,7 +41,7 @@ namespace audiere {
while (left > 0) {
int transfer = std::min(left, int(BUFFER_SIZE));
memset(tmp_l, 0, transfer * sizeof(sample_t));
- int rv = dumb_resample(&m_resampler_l, tmp_l, transfer, 1.0, delta);
+ int rv = dumb_resample(&m_resampler_l, tmp_l, transfer, delta);
if (rv == 0) {
fillBuffers();
if (m_buffer_length == 0) {
@@ -58,8 +58,7 @@ namespace audiere {
}
if (m_native_channel_count == 2) {
memset(tmp_r, 0, transfer * sizeof(sample_t));
- int rv2 = dumb_resample(&m_resampler_r, tmp_r, transfer, 1.0,
- delta);
+ int rv2 = dumb_resample(&m_resampler_r, tmp_r, transfer, delta);
ADR_ASSERT(rv == rv2, "resamplers returned different sample counts");
for (int i = 0; i < rv; i++) {
*out++ = clamp(-32768, tmp_l[i], 32767);