[video output=day019 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Improving Audio Synchronization" vod_platform=youtube id=qFl62ka51Mc annotator=jacebennett annotator=garlandobloom annotator=Miblo] [2:13][Intro] [3:31][Audio Sync Conversation Begins (Summary)] [4:19][#milkhit] [4:28][Why audio sync is an issue] [5:30][Ways to minimize the issue] [6:40][Creating a Debug Diagram for audio sync debug code] [15:37][Finishing up audio sync debug code] [23:43][Explaining and debugging debug code] [30:00][Bug in debug code encountered] [31:31][Addressing bug] [35:00][Compiling and running successfully] [35:30][Observing weird gaps in sound] [35:55][Not tracking frame time correctly] [38:30][Addressing the weird gaps] [50:00][Running new code for debug diagram. Sound card read seems unreliable] [53:00][Sound stream has to be continuous. Figuring out how far ahead of the current play cursor we should be writing] [58:48][Discussing possible solutions to improve audio sync] [1:02:35][Improving audio sync] [1:07:20][Making a running log] [1:08:40][Getting a log of our audio to do some important things] [1:12:00][How much granularity we have] [1:16:20][Audio latency issue found] [1:19:50][Closing remarks] [1:20:28][Q&A][:speech] [1:21:13][Are you setup to use ASI Sound Drivers?] [1:22:05][Is your audio pointer code calculating independently of the variable-fixed visual frames per second?] [1:24:35][What sort of problems can high audio latency introduce?] [1:27:18][Could you use that anonymous union struct trick to access the members of bitmap info header structure more easily?] [1:28:47][Question about switching Audio APIs] [1:31:42][Why are we ignoring write cursor?] [1:33:10][Would splitting related functionality in separate files help?] [1:34:10][If we use the play cursor as offset, could we not overwrite previously written audio data?] [1:39:37][Comments about Audio APIs again] [1:40:14][Would rendering at 60 FPS help with the audio latency?] [1:41:16][Could you change latency values?] [1:41:33][Is it possible that OBS is affecting the audio latency?] [1:42:02][Closing remarks][:speech] [/video]