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
|
n_alSynStartVoiceSyntax#include <n_libaudio.h> void n_alSynStartVoice(N_ALVoice *voice, ALWaveTable *table); Arguments
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
|