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
|
MusStartEffect()Start a sound effect. Syntax musHandle MusStartEffect(int number); Arguments
Explanation
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
Example void AlwaysTriggerSoundEffect(void) { static unsigned long handle=0; if (MusHandleAsk(handle)==0) handle = MusStartEffect(RETRIGGER_SOUND); } See Also
|