Project

General

Profile

Actions

Emulator Issues #2617

closed

XAudio2 support

Added by cascardian about 14 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
DSP
% Done:

0%

Operating system:
Windows
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
Yes
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

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.

Actions #1

Updated by luisr142004 about 14 years ago

  • Status changed from New to Accepted

we'll take this into consideration :) (had been thinking of XAudio2 for a while :P)

Actions #2

Updated by luisr142004 about 14 years ago

  • Priority set to Normal
  • Relates to usability set to Yes
  • Operating system Windows added
Actions #3

Updated by chane2k1 about 14 years ago

xaudio2 woot! would love this, have definitely noticed the audio lag on win 7.

Actions #4

Updated by vadimurputi about 14 years ago

Does this mean dolby pro logic II support?

Actions #5

Updated by Tech.inforeseau almost 14 years ago

that would be great indeed !

Actions #6

Updated by marcel.werner3 almost 14 years ago

at the moment, ANY work in the DSP department would be great :|

Actions #7

Updated by jizardy over 13 years ago

Go for it!

Actions #8

Updated by skidau over 13 years ago

  • Category set to dsp
Actions #9

Updated by NeoBrainX over 13 years ago

  • Status changed from Accepted to Fixed

XAudio2 backend added in r6371.

Actions #10

Updated by takato1442 almost 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

Actions

Also available in: Atom PDF