Function

nuAuStlInit

Syntax:
void nuAuStlInit(musConfig *config)
Arguments:
*config	  musConfig structure of N64 Sound Tools player 
          (Set Parameters for config->basenote,
          config->detune, config->fxs, config->priority
          in advance)
Return Value:
Heap size consumed
Explanation:

Initialize the audio manager and activate two sequence players and the sound player. Also, register the default function to be called when a PRE NMI event occurs.

The least significant 320 Kbytes of the frame buffer are set as the audio heap. 0x4000 bytes are also reserved for each binary song data buffer for the sequence player (songs in N64 Sound Tools). 0x4000 bytes are likewise reserved for the sound effects bank data buffer.

The playback rate, number of channels, and thread priority of the musConfig structure for the N64 Sound Tools player also are set within this function.

There are two methods of setting these musConfig structures, and when changing the audio heap size or the size of the sequence data storage buffer. One is to call this function after directly changing the musConfig structure variable nuAuStlConfig, which is defined in the nuAuSltInit function. The other is to refer to the nuAuInit source and initialize the audio yourself, without using nuAuInit.

The default values of the nuAuStlConfig variables are defined as follows.

musConfig nuAuStlConfig = {
    0,                                  /* control_flag         */
    NU_AU_CHANNELS,                     /* channels             */
    NULL,                               /* sched                */
    NU_AU_MGR_THREAD_PRI,               /* thread_priority      */
    (unsigned char*)NU_AU_HEAP_ADDR,    /* heap                 */
    NU_AU_HEAP_SIZE,                    /* heap_length          */
    NULL,                               /* ptr                  */
    NULL,                               /* wbk                  */
    NULL,                               /* default_fxbank       */
    NU_AU_FIFO_LENGTH,                  /* fifo_length          */
    NU_AU_SYN_UPDATE_MAX,               /* syn_updates          */
    NU_AU_OUTPUT_RATE,                  /* syn_output_rate      */
    NU_AU_CLIST_LEN,                    /* cmd buffer size      */
    1,                                  /* syn_retraceCount     */
    NU_AU_DMA_BUFFER_NUM,               /* syn_num_dma_bufs     */
    NU_AU_DMA_BUFFER_SIZE               /* syn_dma_buf_size     */
};

- CAUTION

NuSystem Ver. 2.00 and later is compatible with N64 Sound Tools Ver. 3.xx. Please note that the specifications of functions have changed from prior versions.


- Revision History

1999/2/1 Change heap size from 512 Kbytes to 320 Kbytes.