From 71e034f21c66eb921bd18779ccb7f183955896d3 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 22 Apr 2014 21:30:51 +0200 Subject: Fix sample adding with no velocity groups present in instrument file (new editor behaviour). --- src/instrumentparser.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/instrumentparser.cc b/src/instrumentparser.cc index c66608b..84cbe23 100644 --- a/src/instrumentparser.cc +++ b/src/instrumentparser.cc @@ -161,7 +161,10 @@ void InstrumentParser::startTag(std::string name, return; } +#ifndef EXPERIMENTAL + // TODO: Old algorithm needs this here. instrument.addSample(lower, upper, sample); +#endif/*EXPERIMENTAL*/ } } @@ -174,7 +177,13 @@ void InstrumentParser::endTag(std::string name) } instrument.samplelist.push_back(s); - s = NULL; + +#ifdef EXPERIMENTAL + // TODO: New algorithm needs this here. Thresholds are ignored, hence '0' + instrument.addSample(0, 0, s); +#endif/*EXPERIMENTAL*/ + + s = NULL; } if(name == "instrument") { -- cgit v1.2.3