28 lines
1.3 KiB
HTML
28 lines
1.3 KiB
HTML
|
<html>
|
||
|
<head>
|
||
|
<!-- __CINERA_INCLUDES__ -->
|
||
|
</head>
|
||
|
<body>
|
||
|
<!-- __CINERA_MENUS__ -->
|
||
|
<!-- __CINERA_PLAYER__ -->
|
||
|
<!-- __CINERA_SCRIPT__ -->
|
||
|
|
||
|
<article id="video-notes">
|
||
|
<h1><!-- __CINERA_TITLE__ --></h1>
|
||
|
<p>Key ideas:</p>
|
||
|
<ul>
|
||
|
<li>Sound is necessarily temporal. You can drop a frame of video and the user probably won't notice, but if your audio
|
||
|
drops out, they probably will notice.</li>
|
||
|
<li>Sound bufers are small, and not all platforms will require us to deal with circular buffers. So one option is to do
|
||
|
a buffer copy per frame and present the game with a contiguous block of memory. This should be cheap enough.</li>
|
||
|
<li>Much like the bitmap, allocate plenty of space for a sound buffer at startup, and reuse it each frame.</li>
|
||
|
</ul>
|
||
|
<h2 id="c-features">C features</h2>
|
||
|
<h3 id="alloca">alloca</h3>
|
||
|
<p><code>alloca</code> is a compiler feature that allows for dynamic allocation <em>on the stack</em>. Much was learned and discussed, but
|
||
|
it should be noted that the function is deprecated and probably shouldn't be used in shipping code.</p>
|
||
|
</article>
|
||
|
|
||
|
</body>
|
||
|
</html>
|