-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
audio: Implement Xbox driver using OpenXDK XAudio #20
Conversation
Tested on real hardware. Works within a specific set of parameters, misbehave outside of that set:
|
I can confirm the issue reported by @sam-itt . I tracked it down to this: nxdk-sdl/src/audio/SDL_audiocvt.c Lines 394 to 402 in 704485b
The loop exit condition is never met (result of I have added a commit to disable our nxdk-pdclib Ideally upstream SDL would not be able to get stuck in this loop though; the C specification is a bit convoluted so I might have missed something, but I believe there's no precision requirement on |
I confirm that it works as expected when given U8/1channel/48k. Tested on real hardware. |
Tested as described in PR description. Works fine both in xqemu and on my 1.6. |
Finally got around to testing this on my 1.0 Xbox, and there seems to be a weird issue causing hangs/crashes (which doesn't happen with the XAudio sample). Sometimes it takes two loops, sometimes a dozen, but I always get a hang or a crash. I added a few debugPrints, and when it hangs, everything seems to work fine until |
I had to rebase for JayFoxRox/hode#1 as I required the gamepad axis fix from the latest master. I'm not sure what problem @thrimbor experiences or how to fix it. I have had my Heart of Darkness port running in the background for a while and it seems to be mostly stable - I got a single hang after about 20 minutes; audio worked flawless until then (and then I'm not even sure if the crash was caused by audio). I'd prefer if we merged this soon (with or without issues) because it's clearly better than master. We can always iterate later. We'll just create an issue about it being unstable / crashy. |
Tested again, merging. |
This implements audio.
Requires XboxDev/nxdk#286 for testing in XQEMU.
Code to test this can be found in JayFoxRox/nxdk#70 (you still have to manually fetch this submodule). There is also JayFoxRox/nxdk#68, but it is very broken (not sure if an issue with this PR or the SDL_mixer port).
During testing I occasionally had a bug in XQEMU where playback would randomly stop forever (no more callbacks either?). The problem still occurs but is much less frequent. I assume this is an independent bug in XAudio or QEMU.
This wasn't tested on hardware yet.