From 72b71bbe0818248b5b3ec91809c1eaa4431cf941 Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 8 Aug 2018 23:33:44 -0700 Subject: [PATCH] Use fixed play speed when note tracks are present Scrubbing doesn't support note tracks, but time tracks do support it. --- src/toolbars/TranscriptionToolBar.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/toolbars/TranscriptionToolBar.cpp b/src/toolbars/TranscriptionToolBar.cpp index c1dbea9c0..bab8dc8f5 100644 --- a/src/toolbars/TranscriptionToolBar.cpp +++ b/src/toolbars/TranscriptionToolBar.cpp @@ -457,6 +457,14 @@ void TranscriptionToolBar::PlayAtSpeed(bool looped, bool cutPreview) // Fixed speed play is the old method, that uses a time track. // VariSpeed play reuses Scrubbing. bool bFixedSpeedPlay = !gPrefs->ReadBool(wxT("/AudioIO/VariSpeedPlay"), true); + // Scrubbing doesn't support note tracks, but the fixed-speed method using time tracks does. + TrackListIterator iter(p->GetTracks()); + for (Track *t = iter.First(); t; t = iter.Next()) { + if (t->GetKind() == Track::Note) { + bFixedSpeedPlay = true; + break; + } + } // Scrubbing only supports straight through play. // So if looped or cutPreview, we have to fall back to fixed speed. bFixedSpeedPlay = bFixedSpeedPlay || looped || cutPreview;