Emulator Issues #2617
closedXAudio2 support
0%
Description
I have searched in both the forums and here, and neither mention anybody
ever suggesting implementing XAudio2. If this is redundant and has already
been discussed by the devs on IRC or the like, I apologize.
Since installing the newest DirectX redistributables is already required,
all users of Dolphin will have XAudio2 support on their machines. Its
benefits should be obvious, although Wikipedia also nicely summarizes them
for those needing to look it up. Its API is clean and nonblocking, its very
multithreading-safe (though that, I know, does not exactly matter in
Dolphin's case), its CPU usage is extremely minimal, and its latency is far
below that of DirectSound in Vista and upwards, as Vista introduced a new
UAA-based audio stack which emulates DirectSound through a WASAPI Session
on the software mixer. DirectSound can still be an option as a sort of
fallback, but once implemented XAudio2 should be the default for Windows users.
Directly using WASAPI is not an option, as this would tie Dolphin
exclusively to the sound device during its runtime, which is at the very
least bad default behaviour and overall not necessary other than for things
such as Reclock.
For a working implementation which is very much ahead compared to
DirectSound (less stuttering mainly), look at SPU2-X on PCSX2 or at VBA-M.
In general, SPU2-X's timestretching code deserves a look all on its own
(DeSmuME, for instance, has also implemented it in its "P" synchronization
method), as Dolphin's DSP's current audio throttling implementation does
not seem to intelligently stretch the sound whatsoever, but that's
something for another issue report.
XAudio2 certainly seems to be easy to use, although Microsoft's official
documentation is not the best. I still wouldn't know how to implement it,
since I'm a C++ noob and its buffering system alone (using an unsigned char
byte array?) confuses the heck out of me. Consequently, I'm useless :)
For the devs this is surely unnecessary, but here are the docs anyway for
those wanting to get a feel for the API and its features:
http://msdn.microsoft.com/en-us/library/ee415737%28v=VS.85%29.aspx
http://en.wikipedia.org/wiki/DirectSound#XAudio_2
Thank you.
Updated by luisr142004 over 14 years ago
- Status changed from New to Accepted
we'll take this into consideration :) (had been thinking of XAudio2 for a while :P)
Updated by luisr142004 over 14 years ago
- Priority set to Normal
- Relates to usability set to Yes
- Operating system Windows added
Updated by chane2k1 over 14 years ago
xaudio2 woot! would love this, have definitely noticed the audio lag on win 7.
Updated by vadimurputi over 14 years ago
Does this mean dolby pro logic II support?
Updated by marcel.werner3 over 14 years ago
at the moment, ANY work in the DSP department would be great :|
Updated by NeoBrainX almost 14 years ago
- Status changed from Accepted to Fixed
XAudio2 backend added in r6371.
Updated by takato1442 over 10 years ago
WASAPI would be better, as it should offer zero latency
and seriously timing IBJ in metroid prime is NOT happening with audio latency