AXInitExSpecifyMem

C Specification

#include <revolution>

void AXInitExSpecifyMem(u32 num, void* mem, u32 outputBufferMode);

Arguments

num Maximum voice count.
mem User allocated AX library memory.
outputBufferMode AI buffer modes (TRUE: Triple-buffer/FALSE: Double-buffer).

Return Values

None.

Description

The AXInitExSpecifyMem function expands the AXInitEx function to allow specification of maximum voice count and library memory area.

The argument num specifies the maximum voice count. The upper limit of the voice count is AX_MAX_VOICES.

A user allocated AX library memory will be specified to the argument mem. The memory size is obtained with the macro AXGetMemorySize. The top address of the memory needs to be 32 byte aligned.

The AX library needs AXPB, AXVPB, and AXPBITDBUFFER structures for each voice to control voice. AX library has count AX_MAX_VOICES of each structure, defined by static.

If AXInitEx function is used for the AX library initialization, the above structures defined in the library are used for controlling voices.

Alternatively, if this function is used in place of the AXInitEx function, structures allocated to the mem 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.

Use this function if you want to make the maximum voice count smaller than AX_MAX_VOICES or you want to allocate voice control structures to a memory of choice between MEM1 and MEM2.

Note: 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 AXRegisterExceedCallback function to adjust the maximum voice count to prevent noise.

See Also

AXInitEx, AXGetMemorySize, AXRegisterExceedCallback

Revision History

2006/10/24 Initial version.


CONFIDENTIAL