Can't we somehow tie our timer to the soundcard clock? I mean, instead of using a fixed offset to calculate the wait time, can we base it on the actual rate of consumption by PA?
That is what is supposed to be happening at least with current upstream, without any extra patches on top. The time adjustments is based on PA stream timing which is supposed to match the actual PA consumption / soundcard timing. Are you actually checking with upstream Wine and not only with downstream solutions? If It might be that my patch I was referencing above is different in this case and should be fixed. Otherwise, it is interesting what is actually going on there, why the time error stacks up on the long run: is it still something wrong in the current code or maybe pulse stream timing is wrong and doesn't reflect the time difference (if the different timeline is the root cause indeed)? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10792#note_138990