Functions

nuAuInit
nuAuInitEx

Syntax:

    s32 nuAu(void)
    s32 nuAuInitEx(void)

Arguments:

    None

Return Value:

    Heap size consumed

Description:

This initializes the audio manager and starts two sequence players and one sound player. It also registers the default function which is called when a PRENMI event has occurred.

The least significant part of the frame buffer is set to 320 Kbytes as the audio heap. For two sequence players, 32 Kbytes each are assigned from this heap.

If you wish to change the audio heap size or to change the sequence data storage buffer size, rather than use nuAuInit, rather refer tot he nuAuInit source and initialize the audio yourself.

The nuAuInit function calls the nuAuMgrInit function and starts the audio manager. This audio manager plays back audio using retrace events. This is the method which has been used in the past.

The nuAuInitEx function calls the nuAuMgrInitEx function. This audio manager plays back audio using retrace events and AI events. This is the newly added audio manager. Since AI-DMA control can be reliably and efficiently accomplished when this audio manager is used, the AI buffer is empty and noise is unlikely to occur. In addition, two audio data buffers is sufficient.

The difference between these two audio managers, besides the above, is the timing with which audio tasks are executed.
In the case of the conventional audio manager, audio tasks are executed immediately after a retrace event.
However, when AI events are used, audio tasks are executed when the AI-DMA register becomes empty.
In addition, due to restrictions on the smallest processing unit in the audio microcode, audio data cannot be created accurately in one-frame pieces.
Consequently, since the audio task execution timing changes for each frame, care is required as this may affect graphics tasks.

    See also:  nuAuMgrInit,nuAuMgrInitEx,nuAuSeqPlayerInit,nuAuSndPlayerInit,nuAuPreNMIFuncSet

- Change History

1999/1/26 Added text regarding the nuAuInitEx function.