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

Nintendo® Confidential




Mus Library Reference


MusPtrBankInitialize()

Initialize a sample bank.

Syntax

  void MusPtrBankInitialize(void *pbank, void *wbank);

Arguments

  • pbank is the address of sample pointer bank file

  • wbank is the address of sample wave bank file

Explanation
Make a sample bank available to the library. If the sample pointer bank has not already been initialized, the various offsets contained in the sample pointer bank, which reference both the sample pointer and sample wave bank files, are remapped to pointers. If a default sample bank is not currently set, then this sample bank is set as the default bank.

The default sample bank is used when the MusStartSong() or the MusStartSongFromMarker() function is used to start songs, if no sample bank override has been defined with the MusPtrBankSetSingle() function.

The default sample bank is used when the MusStartEffect() or the MusStartEffect2() function is used to start sound effects, if no sample bank override is defined. If a sample bank override has been specified with the MusFxBankSetPtrBank() function for the effect bank to which the triggering sound effect belongs, it will be used unless a higher priority override has been set with the MusPtrBankSetSingle() function.

The pbank argument must be a Nintendo 64 Sound Tools .PTR file located with 32-bit alignment (cache alignment is best) in RAM.

The wbank argument must be a Nintendo 64 Sound Tools .WBK file located in ROM or RAM (set when the library is initialized).

Return Value
None

Example

  void AudioSetSampleBank(int sample_bank)
  {
    /* test if sample bank is already loaded */
    if (sample_bank==last_sample_bank)
        return;
    last_sample_bank = sample_bank;
    /* load sample bank */
    AudioTransfer(ptr_address[sample_bank], ptr_buffer);
    AudioTransfer(wbk_address[sample_bank], wbk_buffer);
    /* initialize sample bank */
    MusPtrBankInitialize(ptr_buffer, wbk_buffer);
  }

See Also
MusPtrBankGetCurrent()
MusPtrBankSetCurrent()
MusPtrBankSetSingle()


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-1999
Nintendo of America Inc. All rights reserved
Nintendo and N64 are registered trademarks of Nintendo
Last updated March 1999