Voice Allocation
Overview
- Call
AXAcquireVoice() to acquire a voice. The caller must specify a priority for the voice.
- Call
AXFreeVoice() to free a voice once the voice is no longer needed.
- Call
AXSetVoicePriority() to adjust, as needed, the priority of an acquired voice.
- Call
AXGetDSPCycles() to retrieve the number of DSP cycles used by AX during the last audio frame.
- Call
AXSetMaxDSPCycles() to adjust the maximum number of DSP cycles per frame that AX may use.
- Call
AXGetMaxDSPCycles() to retrieve the maximum number of DSP cycles per frame that AX may use.
Voice Priority
- AX will first expend DSP cycles on the highest priority voices that are newest, during each audio frame.
- Thus, older voices of lower priority will be dropped if AX exhausts the allowed DSP cycles before processing all voices.
Voice Reacquisition
- If the number of active voices reaches
AX_MAX_VOICES 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.
- Upon reacquiring a voice, AX will invoke the voice's associated callback, if any.
Note: Your application specifies the callback when calling AXAcquireVoice().
- Upon receiving a 'dropped voice' callback, you must remove any references to that voice, to ensure that it is no longer serviced by your abstraction layer/voice management scheme.
- The user application must not 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.
DSP Load Management
- 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.
- AX will invoke the associated callback (if any) for each voice, as it is being dropped.
- Upon receiving a 'dropped voice' callback, you must remove any references to that voice, to ensure that it is no longer serviced by your abstraction layer/voice management scheme.
- Your application must not free the voice during the 'dropped-voice' callback.
Revision History
2006/03/01 Initial version.
2006/10/23 Changed the description of the maximum number of voices.
CONFIDENTIAL