alSeqFileNew.3p 1.61 KB
.TH alSeqFileNew 3P local "Silicon Graphics, Inc."

.SH NAME 
.upperok 
alSeqFileNew \- initializes a Sequence Bank File for use on the Ultra 64

.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void	alSeqFileNew(ALSeqFile *file, u8 *base);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I file
pointer to an uninitialized sequence file structure.
.TP
.I base
pointer to the base of sequence file data.
.SH DESCRIPTION
The Sequence Bank Compiler 
.I sbc (3p)
creates a sequence bank (.sbk) file from one or more MIDI sequence
files.  The sequence bank file contains an array of sequences
(8-byte aligned), with a header at the front that allows indexing
into the sequence bank to access individual sequences.  The header
information is defined by the ALSeqFile structure. 
.PP
Before the game application can access the individual sequences, it
must first initialize the sequence bank header by calling alSeqFileNew.
Typically, the game application first allocates enough memory to
contain the sequence bank header information (ALSeqFile).  Then it
copies the header information from the Cartridge ROM into the
allocated ALSeqFile structure.  Finally, it calls alSeqFileNew with
the pointer to the ALSeqFile structure and the base of the sequence
bank data in rom.
.PP
Note that to allocate memory for the sequence bank header, the game
application may need to first access the seqCount field to know the
exact size of the header.
.SH WARNING
The routine is intended to be called once for a single sequence bank
file.  Calling the routine on an already initialized sequence bank
file could produce unexpected results.
.SH SEE ALSO
.IR sbc (3P)