1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

Prepare to split AudioIOBase from AudioIO...

... New files, but (almost) empty; don't use the global variable gAudioIO,
but use one of two accessor function names (which are the same function for
now).

AudioIOBase will have fewer dependencies than AudioIO -- in particular, no
dependency on tracks.

It won't include StartStream.  It will contain functions to query the
present state of streams, and device capabilities.
This commit is contained in:
Paul Licameli
2019-06-10 14:25:50 -04:00
parent 46bf5a82fc
commit 42a4f55ffe
44 changed files with 180 additions and 29 deletions

View File

@@ -382,6 +382,7 @@ AudacityProject *ProjectManager::New()
}
//Initialise the Listeners
auto gAudioIO = AudioIO::Get();
gAudioIO->SetListener( &ProjectAudioManager::Get( project ) );
auto &projectSelectionManager = ProjectSelectionManager::Get( project );
SelectionBar::Get( project ).SetListener( &projectSelectionManager );
@@ -425,6 +426,7 @@ void ProjectManager::OnCloseWindow(wxCloseEvent & event)
auto &projectAudioIO = ProjectAudioIO::Get( project );
auto &tracks = TrackList::Get( project );
auto &window = ProjectWindow::Get( project );
auto gAudioIO = AudioIO::Get();
// We are called for the wxEVT_CLOSE_WINDOW, wxEVT_END_SESSION, and
// wxEVT_QUERY_END_SESSION, so we have to protect against multiple
@@ -760,6 +762,7 @@ void ProjectManager::OnTimer(wxTimerEvent& WXUNUSED(event))
auto &statusBar = *window.GetStatusBar();
auto gAudioIO = AudioIO::Get();
// gAudioIO->GetNumCaptureChannels() should only be positive
// when we are recording.
if (projectAudioIO.GetAudioIOToken() > 0 && gAudioIO->GetNumCaptureChannels() > 0) {