alSynStartVoiceParams alSynStartVoiceParams (function)

alSynStartVoiceParams, n_alSynStartVoiceParams

Starts synthesizing audio samples with the specified voice using the specified parameters

Syntax

#include <libaudio.h>     /* libaudio.h */
void alSynStartVoiceParams(ALSynth *drvr, ALVoice *voice, ALWaveTable *table, 
				f32 pitch, s16 vol, ALPan pan, 
				u8 fxmix, ALMicroTime delta);
#include <n_libaudio.h>     /* n_libaudio.h */
void n_alSynStartVoiceParams(N_ALVoice *voice, ALWaveTable *table,
				f32 pitch, s16 vol, ALPan pan,
				u8 fxmix, ALMicroTime delta);

Arguments

drvr
Pointer to the synthesizer driver

voice
Pointer to a voice

table
Pointer to a wavetable structure (Holds data regarding on storage location of a sampling sound)

pitch
value describing the pitch ratio for playback

vol
Volume to use for playback

pan
Stereo pan to use for playback

fxmix
Relative mix of the effect's processed signal to unprocessed signal

delta
Time in Microseconds for the sound to reach the specified volume level

Description

alSynStartVoiceParams 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. Arguments specified with this function are used. 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 alSynStartVoiceParams. Valid values for pitch, pan, fxmix, and volume are detailed in such pages including alSynStartVoicePram, alSynSetFXMix, and alSynSetVol. When the voice has finished sounding, alSynStopVoice first, and then alSynFreeVoice may be called.

For details on n_audio library, see "Chapter 28: n_audio library" in the N64 Programming Manual.

Note

When you are writing a custom player, this function (alSynStartVoiceParams) 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, alSynSetPitch, alSynSetPan, alSynSetVol, alSynSetFXMix, alSynStartVoice, and alAudioFrame

Revision History

1999/04/30 Changed Format