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>AXInitExSpecifyMem</title> 7<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 8<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows"> 9<META http-equiv="Content-Style-Type" content="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">AXInitExSpecifyMem</h1> 15 16<h2>C Specification</h2> 17 18<BLOCKQUOTE> 19<pre><code>#include <revolution> 20 21void AXInitExSpecifyMem(u32 num, void* mem, u32 outputBufferMode);</CODE></pre> 22</BLOCKQUOTE> 23 24<h2>Arguments</h2> 25 26<table border="1" cellpadding="3" cellspacing="0.1"> 27 <tr> 28<td width="120" bgcolor="#ffffe8"><em><strong><code>num</code></strong></em></td> 29 <td width="520">Maximum voice count.</td> 30 </tr> 31 <tr> 32<td width="120" bgcolor="#ffffe8"><em><strong><code>mem</code></strong></em></td> 33 <td width="520">User allocated AX library memory.</td> 34 </tr> 35 <tr> 36<td width="120" bgcolor="#ffffe8"><em><strong><code>outputBufferMode</code></strong></em></td> 37 <td width="520">AI buffer modes (<code>TRUE</code>: Triple-buffer/<code>FALSE</code>: Double-buffer).</td> 38 </tr> 39</table> 40 41<h2>Return Values</h2> 42 43<p>None.</p> 44 45<h2>Description</h2> 46 47<p>The <code>AXInitExSpecifyMem</code> function expands the <a href="AXInitEx.html"><code>AXInitEx</code></a> function to allow specification of maximum voice count and library memory area.</p> 48 49<p>The argument <code>num</code> specifies the maximum voice count. The upper limit of the voice count is <code>AX_MAX_VOICES</code>.</p> 50 51<p>A user allocated AX library memory will be specified to the argument <code>mem</code>. The memory size is obtained with the macro <a href="AXGetMemorySize.html"><code>AXGetMemorySize</code></a>. The top address of the memory needs to be 32 byte aligned.</p> 52 53<p>The AX library needs <code>AXPB</code>, <code>AXVPB</code>, and <code>AXPBITDBUFFER</code> structures for each voice to control voice. AX library has count <code>AX_MAX_VOICES</code> of each structure, defined by <code>static</code>.</p> 54 55<p>If <a href="AXInitEx.html"><code>AXInitEx</code></a> function is used for the AX library initialization, the above structures defined in the library are used for controlling voices.</p> 56 57<p>Alternatively, if this function is used in place of the <a href="AXInitEx.html"><code>AXInitEx</code></a> function, structures allocated to the <code>mem</code> specified area are used for the control. Here, the linkers for structures defined within the library will not link, so unnecessary structures will not consume extra memory.</p> 58 59<p>Use this function if you want to make the maximum voice count smaller than <code>AX_MAX_VOICES</code> or you want to allocate voice control structures to a memory of choice between MEM1 and MEM2.</p> 60 61<p><strong><B>Note: </B> Generally, MEM2 will have slower access speed compared to MEM1. Placing the voice control structures on MEM2 will decrease the simultaneous playback voices compared to placement in MEM1. Also, the DSP load estimate of AX presupposes that the structures are placed in MEM1. Their placement in MEM2 will make the actual DSP processing time longer than the AX estimate time, resulting in possible noise in the playback. When placing the voice control structures in MEM2, use <a href="../Debug/AXRegisterExceedCallback.html"><code>AXRegisterExceedCallback</code></a> function to adjust the maximum voice count to prevent noise.</strong></p> 62 63<h2>See Also</h2> 64 65<p> 66<code><a href="AXInitEx.html">AXInitEx</a>, <a href="AXGetMemorySize.html">AXGetMemorySize</a>, <a href="../Debug/AXRegisterExceedCallback.html">AXRegisterExceedCallback</a></code> 67</p> 68 69<H2>Revision History</H2> 70<P> 712006/10/24 Initial version. 72</P> 73 74<hr> 75<P>CONFIDENTIAL</p> 76</BODY> 77</HTML> 78