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

Nintendo® Confidential

   

alSynStartVoice

Format
#include <libaudio.h> void alSynStartVoice(ALSynth *drvr, ALVoice *voice, ALWaveTable *table);

Arguments
  • drvr is the pointer to the synthesizer driver
  • voice is the pointer to a voice
  • table is the pointer to a sound wavetable
What This Function Does
It begins generating entries into the command lists created by alAudioFrame to synthesize audio samples for the given voice from sample data in the wavetable pointed to by the table.

Before calling this function, use the specified arguments to allocate the voice from the driver by calling alSynAllocVoice. The alSynAllocVoice function isn't always successful, so be sure to check the result before you call alSynStartVoice.

Before using this function to start a voice, set the pitch, pan, fxmix, and volume arguments, or call alSynStartVoiceParams. Valid values for pitch, pan, fxmix, and volume are detailed in the following pages:

alSynSetPitch
alSynSetPan
alSynSetFXMix
alSynSetVol

When the voice has finished sounding, you can call alSynStopVoice, and then call alSynFreeVoice.

Warning
The synthesis driver expects that the loop data and adpcm book data (if it is a compressed wavetable) are located in DRAM. The actual wavetable data can be located in ROM and later moved (using DMA) into DRAM, but the loop and book data are accessed before the DMA occurs. This is important when you are writing a custom bank file.

When you are writing a custom player, this function (alSynStartVoice) should be called only from within an ALVoiceHandler. Also, do not set any of the voice's arguments (for example, don't call alSynSetVol) if the voice is in the stopped state unless the voice is started in the same audio frame. If you call a function to set a stopped voice's arguments and the voice is not started until one or more frames later, you'll get unexpected results.

See Also
alSynAllocVoice
alSynStopVoice
alSynFreeVoice
alSynStartVoiceParams
alAudioFrame



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