From 171cfb993d72ee927a51911c06c23200ce4b5073 Mon Sep 17 00:00:00 2001 From: Wohlstand Date: Mon, 1 Oct 2018 18:59:51 +0300 Subject: Minor fix of measurer [Backport from OPN2-BE] When we generate nothing on a first window for "zero" peak time, the releasing delay will always be zero. The "Ride cymbal 1" in my "xg.wopn" is an example that was caused by this bug. --- utils/gen_adldata/measurer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/gen_adldata') diff --git a/utils/gen_adldata/measurer.cpp b/utils/gen_adldata/measurer.cpp index 7caf883..dc73363 100644 --- a/utils/gen_adldata/measurer.cpp +++ b/utils/gen_adldata/measurer.cpp @@ -323,7 +323,7 @@ DurationInfo MeasureDurations(const ins &in, OPLChipBase *chip) audioHistory.reset(std::ceil(historyLength * g_outputRate)); for(unsigned period = 0; - (period < peak_amplitude_time) && (period < max_period_on); + ((period < peak_amplitude_time) || (period == 0)) && (period < max_period_on); ++period) { for(unsigned i = 0; i < samples_per_interval;) -- cgit v1.2.3