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
This commit is contained in:
skidau
2010-11-02 00:16:49 +00:00
parent 13dda74946
commit 0af0929a88
6 changed files with 111 additions and 0 deletions

View File

@ -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())