summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/Src/AudioCommon.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2010-11-02 00:16:49 +0000
committerskidau <skidau@gmail.com>2010-11-02 00:16:49 +0000
commit0af0929a88728151390a0ffb8e8e83807d3d1d26 (patch)
treea82cace67efcf6881dd6af3d275e019995669ced /Source/Core/AudioCommon/Src/AudioCommon.cpp
parent13dda7494629bff0f81c1f66f7836908841ecdd7 (diff)
Re-implemented the NullSound back-end. Allows Dolphin to be used on hosts with no sound hardware. Emulates strict DSP timing in the DSP HLE plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6329 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/AudioCommon/Src/AudioCommon.cpp')
-rw-r--r--Source/Core/AudioCommon/Src/AudioCommon.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/Core/AudioCommon/Src/AudioCommon.cpp b/Source/Core/AudioCommon/Src/AudioCommon.cpp
index 774d499f1c..bef8b2e6f9 100644
--- a/Source/Core/AudioCommon/Src/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/Src/AudioCommon.cpp
@@ -17,6 +17,7 @@
#include "AudioCommon.h"
#include "Mixer.h"
+#include "NullSoundStream.h"
#include "DSoundStream.h"
#include "AOSoundStream.h"
#include "AlsaSoundStream.h"
@@ -37,6 +38,8 @@ namespace AudioCommon
std::string backend = ac_Config.sBackend;
if (backend == BACKEND_OPENAL && OpenALStream::isValid())
soundStream = new OpenALStream(mixer);
+ else if (backend == BACKEND_NULLSOUND && NullSound::isValid())
+ soundStream = new NullSound(mixer, g_dspInitialize.hWnd);
else if (backend == BACKEND_DIRECTSOUND && DSound::isValid())
soundStream = new DSound(mixer, g_dspInitialize.hWnd);
else if (backend == BACKEND_AOSOUND && AOSound::isValid())
@@ -91,6 +94,8 @@ namespace AudioCommon
{
std::vector<std::string> backends;
+ if (NullSound::isValid())
+ backends.push_back(BACKEND_NULLSOUND);
if (DSound::isValid())
backends.push_back(BACKEND_DIRECTSOUND);
if (OpenALStream::isValid())