alSeqFileNew.3p
1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
.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)