Open sergeyext opened 2 months ago
Updated to the latest release 1.23.1. Clicking reduced, but not vanished totally, and waveform surges are still here.
You could try playing with the INI settings, particularly periods and period size (In my experience, DirectSound needs a higher buffer in FlexASIO to prevent crackling, so maybe that also applies here)
By the way, I don't think it's recommended to use DirectSound on Vista+ because it gets emulated in WASAPI anyway so it's probably better to use that directly (pun intended) instead. I'm guessing that's why it's the default. https://en.wikipedia.org/wiki/DirectSound#Windows_Vista/Windows_7
Looks like an underrun. The waveform seems to jump back and repeat a bit before getting further, then jumps back and repeats again, etc. I don't really see why that would be happening, OpenAL Soft waits for DSound to signal some notifications on the playback buffer (which are set evenly spaced given the update size and buffer size), where it then mixes into the next free space in the playing buffer.
Maybe something is happening in DSound that causes it to not trigger the notifications as they should, so OpenAL Soft doesn't wake up and mix in time. My first thought was maybe the 44100hz output; if the 44100hz DSound buffer is being resampled to 48000hz for WASAPI, maybe the timing is getting thrown off. Though you say you updated to 1.23.1, which should default to 48khz output and not need resampling, and it still happens, though less often.
But yeah, as ThreeDeeJay says, DirectSound isn't recommended to use anymore since Windows Vista, since it's emulated in software and outputs through WASAPI, so it's not "direct" anymore and is just extra layers between OpenAL Soft and the output, which can cause extra latency and overhead, leading to underruns with smaller buffers.
In my previous issue I reported problems with WASAPI backend and headphones. DSound compares equal to the reference sound when using headphones, but starts clicking after switching to speakers, while WASAPI sounds perfect on speakers.
Here is the waveform recorded with a loopback virtual device with clicks clearly visible:
Here's the sandbox app for reproduction: https://github.com/sergeyext/alsoft-backends-test
and this is app's debug output on my machine: