is presently its sole maintainer,
You can support him:
Fixing an off by one error
Explanation of off by one errors
Overview of the state of our audio code
A breakdown of how time is spent during each frame
A possible, though not great, solution to audio latency
Tradeoff between audio lag and input lag
Falling back to a little bit stupider
Beginning to change the code for the audio output method
Finding the minimum expected audio latency
Converting to seconds using dimensional analysis
Writing sound based on the audio latency
Great aside about keeping code fluid and a bit messy in the early stages
Determining the position to write the audio to
How to deal with the low latency case
A puzzling situation
The aha moment
The approach we will be taking for low latency
The higher latency approach
Putting our approach down in words
Implementing the two case latency handling
Do over due to deleted code
Putting in the latency branching code
Determining if the sound card is latent
Mapping the WriteCursor and the PlayCursor into the same space
Overview of the code determining how to write the sound
How can we possibly predict how many bytes the game should write?
Getting sound output separately with GameGetSoundSamples()
More cleaning up
Implementing GameGetSoundSamples() in the game code
Testing is surprisingly successful, no bugs? NO WAY!
Improving our sound output debug drawing
Recording some additional details in our markers
An assertion fires and some cleanup
First look at the debug drawing output and adding global pause key
Taking a good look at the debug drawing output
A couple early questions
Drawing another debug marker
Improving our estimate of the PlayCursor position to reduce latency
Taking a look at how our estimate lines up
Drawing our 480 sample jitter window
Start of Q&A
Did you try the audio without OBS?
Is it inexpensive to query for the play cursor and the write cursor?
Audio seems to be the most complex part until now, which will be the next most complicated thing?
Audio asserts are a pain when you're debugging other things. Change to log messages.
If we had a buffer that played from start to finish, would it be a valid syncing method to manually set AudioTimer = VideoTimer?
Fully visualize waveforms and remove gradient. Turn entire thing into massive audio visualizer.
Could you please increase ToneHz to 512, my crappy laptop speakers can't output 256?
Will this audio system be able to handle music and sound, or will the game have to mux the audio for us?
How will you make sure that you don't have regressions in some parts that are not that easy to spot right away?
Why is the pitch of the sound changing after the game has been running a little while?
I'm sorry if I'm being slow, but I still don't truly understand why exactly the audio is jumping. It just seems like we should be able to handle it more simply.
Callback to earlier half of question: (I'm sorry if I'm being slow, but I don't truly understand why the audio is skipping.) The original audio skipped when we moved the latency to be inside of three frames.
If it's not too much of an issue, can we have line numbers on the side when you are coding so we can get a grip of where you are.
It's more likely to be the accumulation of a small value onto a larger value that is a numerical problem. Mantissas not lining up.