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


MusStartEffect()

Start a sound effect.

Syntax

  musHandle MusStartEffect(int number);

Arguments

  • number is the sound effect number

Explanation
Start a sound effect with default settings. This function will start a sound effect using the priority level defined in the sound data if the required number of channels is available or a sound effect of lower, or the same, priority is currently playing.

The sound effect started will use the default sound effect bank unless an override has been set with the MusFxBankSetSingle() function. If a sound effect bank override has been specified, this function will use it and then clear the override.

The sound effect started will use the default sample bank unless an override is defined in the sound effect bank with the MusFxBankSetPtrBank() function or set with the higher priority sample bank override function MusPtrBankSetSingle(). If a sample bank override has been set using the MusPtrBankSetSingle() function, this function will use it and then clear the override.

The number is a value in the range of 0 to the number of sound effects stored in the sound effect bank. The number of available sound effects can be found by using the MusFxBankNumberOfEffects() function. Currently, a list of "#defines" is located in the header file associated with the sound effect bank, which can be included by the programmer to allow access to the sound effects by name rather than by number.

Return Value
Sound handle or 0 if sound effect could not be triggered.

Example

  void AlwaysTriggerSoundEffect(void)
  {
    static unsigned long handle=0;

    if (MusHandleAsk(handle)==0)
    handle = MusStartEffect(RETRIGGER_SOUND);
  }

See Also
MusStartEffect2()
MusHandleAsk()
MusHandleSetFreqOffset()
MusHandleSetPan()
MusHandleSetVolume()
MusHandleStop()
MusSetMasterVolume()
MusAsk()
MusStop()


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