MusPtrBankGetCurrent()

Syntax

void *MusPtrBankGetCurrent(void);

Arguments

None

Description

It gets the address of the default sample bank.

The default sample bank is used when the MusStartSong() or the MusStartSongFromMarker() functions are 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. The MusFxBankSetSingle() function is used to specify the sound effect override for the sound effect that starts next.

Return Value

Sample bank address.

Example

void StackSampleBank(void *sample_addr)
{
  sample_bank_stack[stack_ptr++]=MusPtrBankGetCurrent();
  MusPtrBankSetCurrent(sample_addr);
}

void UnStackSampleBank(void)
{
  MusPtrBankSetCurrent(sample_bank_stack[--stack_ptr]);
}

See Also

MusPtrBankInitialize(), MusPtrBankSetCurrent(), MusPtrBankSetSingle()