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<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 6.5.0.0 for Windows">
8<META http-equiv="Content-Style-Type" content="text/css">
9<title>AX Voice Allocation</title>
10</head>
11
12<body>
13
14<h1 align="left">Voice Allocation</h1>
15
16
17<h2>Overview</h2>
18<p>The operations listed below are related to voice allocation. Call the function appropriate to each operation.</p>
19<ul>
20<li><a href="AXAcquireVoice.html"><code>AXAcquireVoice</code></a> to acquire a voice The caller must specify a priority for the voice.
21<li><a href="AXFreeVoice.html"><code>AXFreeVoice</code></a> to free a voice once it is no longer needed
22<li><a href="AXSetVoicePriority.html"><code>AXSetVoicePriority</code></a> to adjust the priority of an <i>acquired</i> voice as needed
23<li><a href="AXGetDSPCycles.html"><code>AXGetDSPCycles</code></a> to retrieve the number of DSP cycles used by AX during the last audio frame
24<li><a href="AXSetMaxDSPCycles.html"><code>AXSetMaxDSPCycles</code></a> to adjust the maximum number of DSP cycles per frame that can can be used by AX
25<li><a href="AXGetMaxDSPCycles.html"><code>AXGetMaxDSPCycles</code></a> to retrieve the maximum number of DSP cycles per frame that can be used by AX
26</ul>
27
28<h2>Voice Priority</h2>
29<p>For voice priority, be aware of the following points.</p>
30<ul>
31<li>During each audio frame, AX will first expend DSP cycles on the highest-priority newest voices.
32<li>Thus, older voices of lower priority will be dropped if AX exhausts the allowed DSP cycles before processing all voices.
33</ul>
34
35
36<h2>Voice Reacquisition</h2>
37<p>For voice reacquisition, be aware of the following.</p>
38<ul>
39<li>If the number of active voices reaches <code>AX_MAX_VOICES</code> or the maximum number of voices specified when the AX library was initialized, the lowest-priority voice of greatest age will be forcibly reacquired for subsequent acquisition requests.
40<li>Upon reacquiring a voice, AX will invoke the voice's associated callback, if any. Be aware that your application specifies the callback when calling the <a href="AXAcquireVoice.html"><code>AXAcquireVoice</code></a> function.
41<li>Upon receiving a &quot;dropped voice&quot; callback, you must remove any references to that voice to ensure that it is no longer serviced by <i>your</i> abstraction layer/voice management scheme.
42<li>The user application must <i><b>not</b></i> free the voice upon receiving the dropped-voice callback. This is because the voice has been forcibly reacquired by AX. In other words, your application must no longer process this voice.
43</ul>
44
45<h2>DSP Load Management</h2>
46<p>For DSP load management, be aware of the following.</p>
47<ul>
48<li>If DSP takes longer than expected or is otherwise late when processing a frame, AX will begin dropping voices based on priority, and then age. The oldest of the lowest priority voices will be dropped first.
49<li>AX will invoke the associated callback (if any) for each voice, as it is being dropped.
50<li>Upon receiving a &quot;dropped voice&quot; callback, you must remove any references to that voice to ensure that it is no longer serviced by <i>your</i> abstraction layer/voice management scheme.
51<li>The user application must <i><b>not</b></i> free the voice upon receiving a &quot;dropped voice&quot; callback.
52</ul>
53
54<h2>Revision History</h2>
55<P>
562007/10/02 Revised the entire document following changes to the structure of function reference.<br>2006/10/23 Changed description for the maximum number of voices.<br>2006/03/01 Initial version.<br>
57</P>
58
59<hr><p>CONFIDENTIAL</p></body>
60</html>
61