diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-17 21:53:01 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2014-05-17 21:53:01 +0200 |
commit | e73d3463d3114db2f5db5a453d30fe642e6024f3 (patch) | |
tree | 826c8b95df74e8b1acb8fb68d0bc915bbcd5d84e /src/drumgizmo.cc | |
parent | bcb9f8b3ae7d477a35e2baa48c5f5bcff2d98986 (diff) |
Fix resampler...
Diffstat (limited to 'src/drumgizmo.cc')
-rw-r--r-- | src/drumgizmo.cc | 6 |
1 files 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; |