diff --git a/src/AudacityApp.cpp b/src/AudacityApp.cpp index 5aaa1e4ce..df3fd429a 100644 --- a/src/AudacityApp.cpp +++ b/src/AudacityApp.cpp @@ -2025,6 +2025,8 @@ int AudacityApp::OnExit() DeinitFFT(); + DeinitAudioIO(); + // Terminate the PluginManager (must be done before deleting the locale) PluginManager::Get().Terminate(); diff --git a/src/AudioIO.cpp b/src/AudioIO.cpp index 5194eb5f8..c46061a04 100644 --- a/src/AudioIO.cpp +++ b/src/AudioIO.cpp @@ -943,6 +943,11 @@ void InitAudioIO() gPrefs->Flush(); } +void DeinitAudioIO() +{ + ugAudioIO.reset(); +} + wxString DeviceName(const PaDeviceInfo* info) { wxString infoName = wxSafeConvertMB2WX(info->name); diff --git a/src/AudioIO.h b/src/AudioIO.h index 007f47f83..059d535e4 100644 --- a/src/AudioIO.h +++ b/src/AudioIO.h @@ -62,6 +62,7 @@ using WaveTrackArray = std::vector < WaveTrack* >; extern AUDACITY_DLL_API AudioIO *gAudioIO; void InitAudioIO(); +void DeinitAudioIO(); wxString DeviceName(const PaDeviceInfo* info); wxString HostName(const PaDeviceInfo* info); bool ValidateDeviceNames();