al - Audio Library Functions gDP - DP GBI Macros gdSP - General GBI Macros gSP - SP GBI Macros gt - Turbo Microcode RDP gu - Graphics Utilities Math - Math Functions Mus - Mus Library nuSys - NuSystem os - N64 Operating System sp - Sprite Library Functions uh - Host to Target IO 64DD - N64 Disk Drive
|
MusInitialize()Initialize the music player and audio player. Syntax int MusInitialize(musConfig *config); Arguments
Explanation
The configuration structure located at the config address contains the following data: typedef struct { int control_flag; int channel; OSSched *sched; int thread_priority; unsigned char *heap; int heap_length; unsigned char *ptr; unsigned char *wbk; void *default_fxbank; int fifo_length; int syn_updates; int syn_output_rate; int syn_rsp_cmds; int syn_retraceCount; int syn_num_dma_bufs; int syn_dma_buf_size; OSPiHandle *diskrom_handle; } musConfig; Return Value
Example int InitMusicPlayer(void) { musConfig init; init.control_flag = 0; init.channels = 24; init.sched = &scheduler; init.thread_priority = 12; init.heap = &audio_heap[0]; init.heap_length = AUDIO_HEAP_SIZE; init.fifo_length = 64; init.ptr = &ptr_buffer[0]; init.wbk = &_wbankSegmentRomStart[0]; init.default_fxbank = NULL; init.syn_output_rate = 44100; init.syn_updates = 256; init.syn_rsp_cmds = 4096; init.syn_retraceCount = 1; init.syn_num_dma_bufs = 36; init.syn_dma_buf_size = 0x1000; /* Please delete the following command */ /* if using a sample stored in 64DD ROM */ /* init.diskrom_handle = osDriveRomInit(); */ return (MusInitialize(&init)); }
|