1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-06 14:27:36 +02:00

Use events to break dependency cycle introduced at 3978e8c

This commit is contained in:
Paul Licameli
2020-11-25 12:18:09 -05:00
parent 7a1ca42109
commit 6944ba564c
6 changed files with 40 additions and 16 deletions

View File

@@ -65,6 +65,8 @@ ProjectAudioManager::ProjectAudioManager( AudacityProject &project )
{
static ProjectStatus::RegisteredStatusWidthFunction
registerStatusWidthFunction{ StatusWidthFunction };
project.Bind( EVT_CHECKPOINT_FAILURE,
&ProjectAudioManager::OnCheckpointFailure, this );
}
ProjectAudioManager::~ProjectAudioManager() = default;
@@ -953,6 +955,12 @@ void ProjectAudioManager::OnSoundActivationThreshold()
}
}
void ProjectAudioManager::OnCheckpointFailure(wxCommandEvent &evt)
{
evt.Skip();
Stop();
}
bool ProjectAudioManager::Playing() const
{
auto gAudioIO = AudioIO::Get();