1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-18 14:41:20 +01:00

Use fixed play speed when note tracks are present

Scrubbing doesn't support note tracks, but time tracks do support it.
This commit is contained in:
Pokechu22
2018-08-08 23:33:44 -07:00
committed by James Crook
parent 67b679b7d1
commit 72b71bbe08

View File

@@ -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;