I just finished watching the audio sync episode, which was a hell of a ride and a lot of fun, but I noticed that at the end Casey computed the ExpectedBytesUntilFlip but in the rush of the stream he never used, https://youtu.be/hELF8KRqSIs?t=7972.
So I wondered if anyone knows in which episode he realizes about that. The audio latency gets reduced a lot, almost perfectly aligned to the FlipPlayCursor.
At the beginning of episode 24, although it doesn't fix the issue. https://hero.handmade.network/episode/code/day024/
I will add that DirectSound is probably not the way to go since it's emulated since Windows Vista. There are several topics in these forums that talk about using WASAPI instead.
https://hero.handmade.network/forums/code-discussion/t/102-day_19_-_audio_latency
There are also several threads that discuss alternative to how Casey tried to get better latency or discuss issues with DirectSound.
Oh! This is awesome! I didn't know that there was a post thread for each episode, and good to know about Direct sound being emulated. I'll definitely take a look at the episode threads now, I'm arriving too late to the party :P but it's a lot of fun either way.
Thanks mrmixer :pray: