sinamas wrote:While the wave hq output may allow you to bypass the hardware DSP, using DirectSound instead of WASAPI means that you pass through an additional software DSP layer instead.
Even if tthe sound passes through that layer, the Win7 resampler does a much better job than the 'hardware' one performed by the DSP (the hardware DSP always resamples to 48kHz even if you feed it 48kHz audio).
DirectSound in Vista/7 means additional buffering/latency and that less precise statistics are reported back to gambatte for audio/video timing.
I'm not convinced that XAudio2 has any benefit over DirectSound for streaming.
It has noticeably lower latency. Try comparing XAudio2 vs. DirectSound in VisualBoy Advance or Dolphin-Emu, for example.
24 bit has no benefit, as gambatte outputs 16 bit samples anyway.
I know that. It's just the HQ output always operates at 24bits (20 bits effective).
Are you sure that only shared mode works with the AC97* output? Because that's not expected behavior.
It's a weird driver issue. I did another test on Win7 32-bit:
* AC3/SPDIF output: WASAPI shared mode works (48kHz), sound is fine. WASAPI exclusive: no sound
* Master Mixer output: No sound or error message (sound engine failure) with WASAPI shared / exclusive
* Wave HQ output: Error message (sound engine failure) with WASAPI shared / exclusive
NOTE: It's 'AC3/SPDIF', not AC'97
With other apps, XAudio2 and ASIO output works fine. Only WASAPI has issues.
The "horrible desyncs", that you didn't bother to explain, may be related to your combination of audio settings and audio drivers.
Here's how to reproduce that issue:
Set the sound output in gambatte 0.4.1 to DirectSound, latency = 40ms, global buffer=OFF.
Load Tetris DX and choose 'Marathon Mode'.
Now open the Windows 'Playback Devices' window and resume playing Tetris DX in Marathon Mode. The green volume level meter(s) in the playback devices window should move. After playing a bit, click 'PrintScreen' to take a screenshot. Play a bit more. gambatte should desync horribly. The only way to get the emulator back in sync is to open the emulator sound options and 'reset' the output.