From 15de70643ff6f87d361c39b81f4ea9649c54b378 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 15 Mar 2015 09:55:25 +0100 Subject: Fix small but nasty buffer offset bug in resampled output. Also; use non-resampling engine if ratio == 1.0. --- src/drumgizmo.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 6fd454e..7ce05ef 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -283,7 +283,8 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples) // Write audio // #ifdef WITH_RESAMPLER - if(Conf::enable_resampling == false) { // No resampling needed + if(Conf::enable_resampling == false || + resampler[0].ratio() == 1.0) { // No resampling needed #endif for(size_t c = 0; c < kit.channels.size(); c++) { sample_t *buf = samples; @@ -318,21 +319,22 @@ bool DrumGizmo::run(size_t pos, sample_t *samples, size_t nsamples) // Process channel data size_t kitpos = pos * resampler[0].ratio(); + size_t insize = sizeof(resampler_input_buffer[0]) / sizeof(sample_t); + //printf("ratio: %f\n", resampler[c].ratio()); while(resampler[0].getOutputSampleCount() > 0) { for(size_t c = 0; c < kit.channels.size(); c++) { if(resampler[c].getInputSampleCount() == 0) { sample_t *sin = resampler_input_buffer[c]; - size_t insize = sizeof(resampler_input_buffer[c]) / sizeof(sample_t); memset(resampler_input_buffer[c], 0, sizeof(resampler_input_buffer[c])); getSamples(c, kitpos, sin, insize); - kitpos += insize; resampler[c].setInputSamples(sin, insize); } resampler[c].process(); } + kitpos += insize; } // Write output data to output engine. -- cgit v1.2.3 From aaa7c69bd9529575259a4be7586d1e57dde15fd2 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 15 Mar 2015 09:55:43 +0100 Subject: Bump version top 0.9.8.1 (hotfix release) --- version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.h b/version.h index a6cedd4..1090d16 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define VERSION "0.9.8" +#define VERSION "0.9.8.1" -- cgit v1.2.3 From ab79dfc8ebe7e1b0f7eada7f87742ce170ba2753 Mon Sep 17 00:00:00 2001 From: Lars Bisballe Jensen Date: Mon, 16 Mar 2015 11:29:57 +0100 Subject: Added changes for 0.9.8.1-hotfix release --- ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1bb2bee..9c4cfd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Version 0.9.8.1-hotfix +====================== +Released March 16th 2015 + - Fixed bug where resampling resulted in sample skewing over the output channels + Version 0.9.8 ============= Released February 22nd 2015 -- cgit v1.2.3