1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-01 20:14:49 +02:00

Clearer code for OnPlayStop

The function naming is unfortunate as it is not clear that this
is a toggle between Play and Stop.  Added comments, renaming,
and split a function, and removed a little duplication.
This commit is contained in:
James Crook
2020-03-09 11:12:24 +00:00
parent 194855b738
commit 91bf05d18c
2 changed files with 39 additions and 30 deletions

View File

@@ -1019,8 +1019,7 @@ TransportTracks ProjectAudioManager::GetAllPlaybackTracks(
}
// Stop playing or recording, if paused.
void ProjectAudioManager::StopIfPaused
()
void ProjectAudioManager::StopIfPaused()
{
if( AudioIOBase::Get()->IsPaused() )
Stop();