From 17dbc476f4c2d984d083d66d142cca496ed5f84e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 4 Jul 2021 19:06:01 +0200 Subject: Fix compiler warning. --- src/drumgizmo.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index a38186f..d3665c2 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -438,7 +438,7 @@ float DrumGizmo::samplerate() void DrumGizmo::setSamplerate(float samplerate, float resampling_quality) { - DEBUG(dgeditor, "%s samplerate: %f\n", __PRETTY_FUNCTION__, samplerate); + DEBUG(engine, "%s samplerate: %f\n", __PRETTY_FUNCTION__, samplerate); settings.samplerate.store(samplerate); // Notify input engine of the samplerate change. @@ -470,7 +470,8 @@ void DrumGizmo::setSamplerate(float samplerate, float resampling_quality) zita[c].set_inp_data(nullptr); zita[c].set_inp_count(null_size); - auto scratch_buffer_size = (null_size / ratio) + 1; + std::size_t scratch_buffer_size = (null_size / ratio); + if(scratch_buffer.size() < scratch_buffer_size) { scratch_buffer.resize(scratch_buffer_size); -- cgit v1.2.3