2018-01-08 22:10:24 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2018-01-15 22:23:46 +00:00
|
|
|
<!-- __CINERA_INCLUDES__ -->
|
2018-01-08 22:10:24 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2018-01-15 22:08:37 +00:00
|
|
|
<div id="cinera">
|
|
|
|
<!-- __CINERA_MENUS__ -->
|
|
|
|
<!-- __CINERA_PLAYER__ -->
|
2018-01-15 22:23:46 +00:00
|
|
|
|
|
|
|
<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>
|
2018-01-15 22:08:37 +00:00
|
|
|
</div>
|
|
|
|
<!-- __CINERA_SCRIPT__ -->
|
2018-01-08 22:10:24 +00:00
|
|
|
</body>
|
|
|
|
</html>
|