mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
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
This commit is contained in:
@ -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())
|
||||
|
Reference in New Issue
Block a user