1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
6<title>SYNRunAudioFrame</title>
7<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
8<META http-equiv="Content-Style-Type" content="text/css">
9</head>
10
11<body>
12
13<h1 align="left">SYNRunAudioFrame</h1>
14
15<h2>Syntax</h2>
16<dl><dd><pre class="construction">
17#include &lt;revolution.h&gt;
18#include &lt;revolution/syn.h&gt;
19
20void SYNRunAudioFrame(void);
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<p>None.</p>
25
26<h2>Return Values</h2>
27<p>None.</p>
28
29<h2>Description</h2>
30<p><CODE>SYNRunAudioFrame</CODE> runs and services all active voices for a single audio frame. <CODE>SYNRunAudioFrame</CODE> can run with interrupts enabled. This function must be called by the audio frame callback routine, which in turn must be registered by <CODE>AXRegisterCallback</CODE>. For example:</p>
31<BLOCKQUOTE>
32<pre><CODE>static void callbackForAudioFrame(void)</CODE></pre>
33</BLOCKQUOTE>
34<BLOCKQUOTE>
35<pre><CODE>{
36SYNRunAudioFrame();		//runs the synthesizer
37MIXUpdateSettings();	//updates and changes some settings with SYN</CODE></pre>
38</BLOCKQUOTE>
39<BLOCKQUOTE>
40<pre><CODE>}</CODE></pre>
41</BLOCKQUOTE>
42<BLOCKQUOTE>
43<pre><CODE>void main(void)</CODE></pre>
44</BLOCKQUOTE>
45<BLOCKQUOTE>
46<pre><CODE>{
47    ...</CODE></pre>
48</BLOCKQUOTE>
49<BLOCKQUOTE><CODE><CODE>AXInit();<br>
50&nbsp;&nbsp;&nbsp; MIXInit();<br>
51&nbsp;&nbsp;&nbsp; SYNInit();<br>
52&nbsp;&nbsp;&nbsp; AXRegisterCallback(&amp;callbackAudioFrame); </CODE></CODE></BLOCKQUOTE>
53<BLOCKQUOTE><CODE><CODE>&nbsp;&nbsp;&nbsp; ...<br>
54<br>
55&nbsp;&nbsp;&nbsp; SYNQuit();<br>
56&nbsp;&nbsp;&nbsp; MIXQuit();<br>
57AXQuit();<br>
58&nbsp;&nbsp;&nbsp; ...<br>
59}</CODE></CODE></BLOCKQUOTE>
60
61<h2>See Also</h2>
62<p class="reference">
63<a href="../../ax/Initialization/AXRegisterCallback.html">AXRegisterCallback</a>,
64<a href="../Mixer/MIXInit.html">MIXInit</a>,
65<a href="../../ax/Initialization/AXInit.html">AXInit</a>
66</p>
67
68<h2>Revision History</h2>
69<P>
702006/03/01 Initial version.<BR>
71</P>
72
73<hr><p>CONFIDENTIAL</p></body>
74</html>
75