summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/Src/AudioCommon.cpp
diff options
context:
space:
mode:
authornakeee <nakeee@gmail.com>2009-03-27 14:26:44 +0000
committernakeee <nakeee@gmail.com>2009-03-27 14:26:44 +0000
commita0e9e53d0ce2995cfb327f9a82395bbfc1ed73b6 (patch)
tree4d977f47c279f02f4fc083b8127ea7ef2cfe0cda /Source/Core/AudioCommon/Src/AudioCommon.cpp
parent542bd73ba83978345ed2e99356ba7857f5c9c528 (diff)
more clean up, starting to add recording support to sound stream
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2762 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/Src/AudioCommon.cpp30
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