MusFxBankSetSingle()

Syntax

void MusFxBankSetSingle(void *ifxbank);

Arguments

ifxbank
the address of an initialized sound effect bank

Description

It sets the sound effect bank override. If the override is set to NULL, then it is disabled. The sound effect bank override is cleared when the MusStartEffect() or the MusStartEffect2() function is called.

The default sound effect bank is used when the MusStartEffect() or the MusStartEffect2() function is used to start sound effects, if no sound effect bank override has been defined. The MusFxBankSetSingle() function can be used to define a sound effect bank override for the next sound effect started.

The ifxbank must contain the address of a sound effect bank initialized with the MusFxBankInitialize() function.

Return Value

None

Example

musHandle AudioStartEffect(void *fxbank, int number)
{
  musHandle handle;

  if (number>=MusFxBankNumberOfEffects(fxbank))
    return (0); /* failure! */
  MusFxBankSetSingle(fxbank);
  handle = MusStartEffect(number);
  return (handle);
}

See Also

MusFxBankInitialize(), MusFxBankSetCurrent(), MusStartEffect(), MusStartEffect2()