diff options
author | Wohlstand <admin@wohlnet.ru> | 2018-10-01 18:59:51 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2018-10-01 18:59:51 +0300 |
commit | 171cfb993d72ee927a51911c06c23200ce4b5073 (patch) | |
tree | bf8651b370829c5d9987d26167a5ecac7ad588ae /utils | |
parent | b9bfb0d04c8c724cc52b0bfe311559a5c833efa9 (diff) | |
download | libADLMIDI-171cfb993d72ee927a51911c06c23200ce4b5073.tar.gz libADLMIDI-171cfb993d72ee927a51911c06c23200ce4b5073.tar.bz2 libADLMIDI-171cfb993d72ee927a51911c06c23200ce4b5073.zip |
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.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/gen_adldata/measurer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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;) |