From a9f6935aae18fe59165b1c09002c8e2b358e0ca0 Mon Sep 17 00:00:00 2001 From: Infinity <573679956@qq.com> Date: Sat, 9 Mar 2024 03:07:18 +0800 Subject: [PATCH] Update AudioGeneratorRTTTL.cpp --- 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]==',')) {