diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-07-04 19:06:01 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-07-04 19:06:01 +0200 |
commit | 17dbc476f4c2d984d083d66d142cca496ed5f84e (patch) | |
tree | 39408e185531033199799a9385220f180eeb6da4 /src | |
parent | 39118c5f8577451c434531cf38c7505762c69484 (diff) |
Fix compiler warning.
Diffstat (limited to 'src')
-rw-r--r-- | src/drumgizmo.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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); |