alHeapInit.3p
1.59 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
59
60
61
62
63
64
65
66
.TH alHeapInit 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
alHeapInit \- initialize an audio heap for use with the Ultra 64 Audio Library
.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void alHeapInit(ALHeap *hp, u8 *base, s32 len);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I hp
pointer to the ALHeap structure representing the heap to initialize
.TP
.I base
pointer to the start of DRAM heap.
.TP
.I len
length, in bytes, of the DRAM heap.
.SH DESCRIPTION
The audio heap functionality provides a way for the application to
provide memory to the audio library. At initialization time,
the application passes a pointer to the heap, when making the following
calls:
.B alInit(),
.B alSeqpNew(),
.B alCSPNew(),
and
.B alSndpNew().
When these calls return, they have completed all memory allocation that
they will need. In addition to using the audio heap for library
initialization routines, typical applications will use the heap for
allocation of application controlled buffers.
The audio heap functionality provides a convenient way to insure that
buffers are aligned to 16 byte boundaries. This is highly suggested
for any buffer that is shared between the RSP and the CPU.
After the audio library is initialized, and the application has allocated
all the buffers that it needs, the heap structure can be examined to see
if the amount of space originally allocated for the heap was of the
appropriate size.
Note: Memory allocated from audio heaps cannot be freed.
.SH SEE ALSO
.IR alHeapAlloc (3P),
.IR alHeapCheck (3P),
.IR alInit (3P),
.IR alSeqpNew (3P),
.IR alCSPNew (3P),
.IR alSndpNew (3P)