summaryrefslogtreecommitdiff
path: root/Source/Core/AudioCommon/Src/AudioCommon.cpp
diff options
context:
space:
mode:
authormylek4 <mylek4@gmail.com>2010-11-10 08:28:26 +0000
committermylek4 <mylek4@gmail.com>2010-11-10 08:28:26 +0000
commit1991a4f3a547010a38177754d8d71bdd1fa5d16c (patch)
tree62ee033fe2ae8bc225bf9e68de5ae29ddaa1701b /Source/Core/AudioCommon/Src/AudioCommon.cpp
parent6ece147568bdea67929a85444d052fef2099bcf5 (diff)
Added XAudio2 backend.
Windows audio backend with lower latency. Audio never glitches on my machine but the number of buffers may be set too aggressively. If you run into problems try turning up NUM_BUFFERS in the h file and leave some feedback. From my tests games seem to prefer filling the buffer with smaller chunks. For this to work the callback that fills the buffer needs to either spin or run async so I went with async. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6371 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 bef8b2e6f9..7bb1dfbd8d 100644
--- a/Source/Core/AudioCommon/Src/AudioCommon.cpp
+++ b/Source/Core/AudioCommon/Src/AudioCommon.cpp
@@ -19,6 +19,7 @@
#include "Mixer.h"
#include "NullSoundStream.h"
#include "DSoundStream.h"
+#include "XAudio2Stream.h"
#include "AOSoundStream.h"
#include "AlsaSoundStream.h"
#ifdef __APPLE__
@@ -42,6 +43,8 @@ namespace AudioCommon
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_XAUDIO2 && XAudio2::isValid())
+ soundStream = new XAudio2(mixer);
else if (backend == BACKEND_AOSOUND && AOSound::isValid())
soundStream = new AOSound(mixer);
else if (backend == BACKEND_ALSA && AlsaSound::isValid())
@@ -98,6 +101,8 @@ namespace AudioCommon
backends.push_back(BACKEND_NULLSOUND);
if (DSound::isValid())
backends.push_back(BACKEND_DIRECTSOUND);
+ if (XAudio2::isValid())
+ backends.push_back(BACKEND_XAUDIO2);
if (OpenALStream::isValid())
backends.push_back(BACKEND_OPENAL);
if (AOSound::isValid())