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

   

n_alSynStartVoice

Format
#include <n_libaudio.h> void n_alSynStartVoice(N_ALVoice *voice, ALWaveTable *table);

Arguments
  • voice is the pointer to a voice
  • table is the pointer to a sound wavetable
What This Function Does
This function is available in the n_audio library. It begins generating entries into the command lists created by n_alAudioFrame to synthesize audio samples for the given voice from sample data in the wavetable pointed to by the table argument.

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

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

n_alSynSetPitch
n_alSynSetPan
n_alSynSetFXMix
n_alSynSetVol

When the voice has finished sounding, call n_alSynStopVoice, and then call n_alSynFreeVoice.

Warning
The synthesis driver expects the loop data and adpcm book data (if it is a compressed wavetable) to be 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 (n_alSynStartVoice) should be called only from within a voice handler routine. Also, do not set any of the voice's arguments (for example, don't call n_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
n_alSynAllocVoice
n_alSynStopVoice
n_alSynFreeVoice
n_alSynStartVoiceParams
n_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