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>AIInit</title> 7<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 8<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 9<META http-equiv="Content-Style-Type" content="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">AIInit</h1> 15 16<h2>Syntax</h2> 17<dl><dd><pre class="construction"> 18#include <revolution/ai.h> 19 20void AIInit(u8 *stack); 21</pre></dd></dl> 22 23<h2>Arguments</h2> 24<TABLE class="arguments" border="1" > 25 <tr> 26<th>stack</th> 27<td>Pointer to the upper address on the stack that the AI DMA interrupt (<code>AIDINT</code>) callback uses. In other words, the end of the memory buffer to use for the stack must be set here (stacks grow downward in memory). Note that this value must be 8-byte aligned. If <CODE>NULL</CODE> is set, the current stack is used instead.</td> 28 </tr> 29</table> 30 31<h2>Return Values</h2> 32<P>None.</P> 33 34<h2>Description</h2> 35<p>The <CODE>AIInit</CODE> function initializes the AI library. This function does the following:</p> 36 37<ul> 38<li>Initializes the sampling frequency for the DSP output to 32 kHz.</li> 39<li>Enables the AI DMA interrupt (<code>AIDINT</code>).</li> 40<li>Initializes the AI DMA interrupt (<code>AIDINT</code>) callback. (Callbacks are not registered in the initial state.)</li> 41</ul> 42 43<p>The <code>AIInit</code> function must be called before any audio operations or system AI calls. This function only needs to be called once for the lifetime of an application. Subsequent calls to this function will be ignored.</p> 44 45<h2>See Also</h2> 46<P>None.</P> 47 48<H2>Revision History</H2> 49<P> 502006/03/01 Initial version.<BR> 51</P> 52 53<hr><p>CONFIDENTIAL</p></body> 54</html> 55