So, Casey mentions here:
https://youtu.be/qGC3xiliJW8?t=4266
that we use a 2 second sound buffer, because it sounds better when we drop frames. i didn't really get his explanation though.
First, he brought up that there are 2 ways to actually approach a audio dropout:
first, you could write way ahead of the actual game. he said the negatives with this is that it creates latency (i understand this) and that it can cause overwriting (i have no idea what this means)
second, you could write one frame ahead, but if the buffer was too small, then you would hear the contents of the buffer repeating again and again. if this is the case, how is a 2 second buffer better? is it because, for music, for example, you would not hear a 100ms clip repeating again and again, and would instead hear a 2-second clip which sounds a lot more normal than a very short clip when put on loop? According to Casey, when using a 2 second buffer, "even if your game gets hammered for some reason... you'll still actually be fine. it can play forever on that 2 second buffer, and there'll only be one skip point." I don't really get this.
i guess to summarize my main 2 questions are:
- what is overwriting and how would writing way ahead of the game cause it?
- how does having a 2 second buffer, lead to having only one "skip point" as Casey put it / having more normal sounding audio during a audio dropout?
Thanks!