From e73d3463d3114db2f5db5a453d30fe642e6024f3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 17 May 2014 21:53:01 +0200 Subject: Fix resampler... --- src/drumgizmo.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 3ffcba5..8fb449a 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -172,7 +172,7 @@ void DrumGizmo::handleMessage(Message *msg) bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples) { double samplerate_scale = 1.0; -#ifndef WITH_RESAMPLE +#ifdef WITH_RESAMPLE if(oe->samplerate() != UNKNOWN_SAMPLERATE) { samplerate_scale = (double)kit.samplerate() / (double)oe->samplerate(); } @@ -300,8 +300,8 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples) size_t nkitsamples = nsamples * samplerate_scale; sample_t kitsamples[nkitsamples]; - memset(rs, 0, nkitsamples * sizeof(sample_t)); - getSamples(c, pos * samplerate_scale, rs, nkitsamples); + memset(kitsamples, 0, nkitsamples * sizeof(sample_t)); + getSamples(c, pos * samplerate_scale, kitsamples, nkitsamples); #ifdef ZITA Resampler resampler; -- cgit v1.2.3