diff options
Diffstat (limited to 'Source/Core/AudioCommon/Src/AudioCommon.cpp')
| -rw-r--r-- | Source/Core/AudioCommon/Src/AudioCommon.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommon.cpp b/Source/Core/AudioCommon/Src/AudioCommon.cpp index e8f60bc175..bc3d30c25f 100644 --- a/Source/Core/AudioCommon/Src/AudioCommon.cpp +++ b/Source/Core/AudioCommon/Src/AudioCommon.cpp @@ -48,4 +48,34 @@ SoundStream *InitSoundStream(std::string backend, CMixer *mixer) { return soundStream; } +void ShutdownSoundStream() { + NOTICE_LOG(DSPHLE, "Shutting down sound stream"); + + if (soundStream) { + soundStream->Stop(); + soundStream->StopLogAudio(); + delete soundStream; + soundStream = NULL; + } + + // Check that soundstream already is stopped. + while (soundStream) { + ERROR_LOG(DSPHLE, "Waiting for sound stream"); + Common::SleepCurrentThread(2000); + } + INFO_LOG(DSPHLE, "Done shutting down sound stream"); +} + +std::vector<std::string> GetSoundBackends() { + std::vector<std::string> backends; + // Add avaliable output options + if (DSound::isValid()) + backends.push_back("DSound"); + if (AOSound::isValid()) + backends.push_back("AOSound"); + backends.push_back("NullSound"); + + return backends; +} + } // Namespace |
