From 51a584c2b79d3d6b9bd0a52a196ec97de369ff87 Mon Sep 17 00:00:00 2001 From: Infinity <573679956@qq.com> Date: Fri, 26 Apr 2024 08:51:42 +0800 Subject: [PATCH] Update AudioGeneratorRTTTL.cpp for dotted length (#668) --- src/AudioGeneratorRTTTL.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AudioGeneratorRTTTL.cpp b/src/AudioGeneratorRTTTL.cpp index 5eb1848..91d07e6 100644 --- a/src/AudioGeneratorRTTTL.cpp +++ b/src/AudioGeneratorRTTTL.cpp @@ -236,13 +236,13 @@ bool AudioGeneratorRTTTL::GetNextNote() ptr++; note++; } + if (!ReadInt(&scale)) { + scale = defaultOctave; + } if ((ptr < len) && (buff[ptr] == '.')) { ptr++; dur += dur / 2; } - if (!ReadInt(&scale)) { - scale = defaultOctave; - } // Eat any trailing whitespace and comma SkipWhitespace(); if ((ptr < len) && (buff[ptr]==',')) {