N64® Functions Menu

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
nuSys - NuSystem
os - N64 Operating System
sp - Sprite Library Functions
uh - Host to Target IO
64DD - N64 Disk Drive

Nintendo® Confidential

   

alHeapInit

Format
#include <libaudio.h>
void alHeapInit(ALHeap *hp, u8 *base, s32 len);


Arguments
  • hp is the pointer to the ALHeap heap structure to initialize
  • base is the pointer to the start of the DRAM heap
  • len is the length, in bytes, of the DRAM heap
What This Function Does
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 it calls the following functions: When these calls return, they have completed all the memory allocation that they will need. In addition to using the audio heap for library initialization routines, typical applications use the heap for allocation of application controlled buffers.

The audio heap functionality provides a convenient way to ensure that buffers are aligned to 16-byte boundaries. This is highly recommended for any buffer that is shared between the reality serial processor (RSP) and the central processing unit (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. This is especially important because memory allocated from audio heaps cannot be freed.

See Also
alHeapAlloc
alHeapCheck
alInit
alSeqpNew
alCSPNew
alSndpNew



Nintendo® Confidential

Warning: all information in this document is confidential and covered by a non-disclosure agreement. You are responsible for keeping this information confidential and protected. Nintendo will vigorously enforce this responsibility.


Copyright © 1998
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last Updated January 1998