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_alSynStartVoiceParams

Format
#include <n_libaudio.h>
void n_alSynStartVoiceParams(
   N_ALVoice *voice,
   ALWaveTable *table,
   f32 pitch, s16 vol,
   ALPan pan, u8 fxmix,
   ALMicroTime delta);
Arguments
  • voice is the pointer to a voice
  • table is the pointer to a sound wavetable
  • pitch is the float value describing the pitch ratio
  • vol is the volume to use for playback
  • pan is the stereo pan to use for playback
  • fxmix is the relative mix of the effect's processed signal to unprocessed signal (wet/dry)
  • delta is the time in microseconds for the sound to reach the specified volume level
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_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 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 (n_alSynStartVoiceParams) should be called only from within a voice handler. 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_alSynStartVoice
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