1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
2<html>
3
4<head>
5<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
6<title>AX Voice Allocation</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">Voice Allocation</h1>
15
16
17<h2>Overview</h2>
18
19<ul>
20<li>Call <code>AXAcquireVoice()</code> to acquire a voice. The caller must specify a priority for the voice.
21<li>Call <code>AXFreeVoice()</code> to free a voice once the voice is no longer needed.
22<li>Call <code>AXSetVoicePriority()</code> to adjust, as needed, the priority of an <i>acquired</i> voice.
23<li>Call <code>AXGetDSPCycles()</code> to retrieve the number of DSP cycles used by AX during the last audio frame.
24<li>Call <code>AXSetMaxDSPCycles()</code> to adjust the maximum number of DSP cycles per frame that AX may use.
25<li>Call <code>AXGetMaxDSPCycles()</code> to retrieve the maximum number of DSP cycles per frame that AX may use.
26</ul>
27
28<h2>Voice Priority</h2>
29
30<ul>
31<li>AX will first expend DSP cycles on the highest priority voices that are newest, during each audio frame.
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
38<ul>
39<li>If the number of active voices reaches <code>AX_MAX_VOICES</code> or reaches 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. <BR><B>Note:</B> Your application specifies the callback when calling <code>AXAcquireVoice()</code>.
41<li>Upon receiving a 'dropped voice' 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
47<ul>
48<li>If the 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 'dropped voice' 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>Your application must <i><b>not</b></i> free the voice during the 'dropped-voice' callback.
52</ul>
53
54<h2>Revision History</h2>
55
56<P>
572006/03/01 Initial version. <BR>2006/10/23 Changed the description of the maximum number of voices.
58</P>
59
60<hr>
61<P>CONFIDENTIAL</p>
62</BODY>
63</HTML>
64