alSynStartVoiceParam.3p 2.44 KB
.TH alSynStartVoiceParam 3P local "Silicon Graphics, Inc."

.SH NAME 
.upperok 
alSynStartVoiceParam \- start synthesizing audio samples with the specified voice
using the specified parameters.

.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void	alSynStartVoiceParam(ALSynth *drvr, ALVoice *voice, ALWaveTable *tbl, 
f32 pitch, s16 vol, ALPan pan, u8 fxmix, ALMicroTime time);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I drvr
pointer to the synthesizer driver.
.TP
.I voice
pointer to a voice.
.TP
.I tbl
pointer to a sound wavetable.
.TP
.I pitch
float value describing the pitch ratio.
.TP
.I vol
volume to use for playback.
.TP
.I pan
stereo pan to use for playback.
.TP
.I fxmix
relative mix of effect processed signal to unprocessed signal.
.TP
.I time
time in Microseconds for the sound to reach the specified volume level.
.SH DESCRIPTION
Begin generating entries into the command lists created by alAudioFrame, 
to synthesize audio samples for the given
.I voice
from sample data in the wavetable pointed to by
.I table.
using the parameters specifed. Before calling alSynStartVoiceParam, the voice 
must be allocated from the driver with a call to alSynAllocVoice. Since 
alSynAllocVoice isn't always successful, be sure to check the result before 
calling alSynStartVoiceParam. Valid values for pitch, pan, fxmix, and volume
are detailed in man pages alSynSetPitch, alSynSetPan, alSynSetFXMix and 
alSynSetVol. When the voice has finished sounding, alSynStopVoice may be 
called, and then alSynFreeVoice.
.SH WARNING
The synthesis driver expects that the loop data and adpcm book data (if
compressed wavetable) are located in DRAM.  The actual wavetable data
can be located in ROM and later DMA'd into DRAM, but the loop and book
data are accessed before the DMA occurs.  This is important when writing
a custom bank file.

When writing a custom player, alSynStartVoiceParam should only be called from
within an ALVoiceHandler. Also, do not set any of the voice's parameters
(eg. alSynSetVol) if the voice is in the stopped state,
.I unless
the voice is started in the same audio frame. In other words, if a call
is made to set a stopped voice's parameters and the voice is not started
until one or more frames later, then unexpected results will occur.
.SH SEE ALSO
.IR alSynAllocVoice (3P),
.IR alSynStopVoice (3P),
.IR alSynFreeVoice (3P),
.IR alSynSetPitch (3P),
.IR alSynSetPan (3P),
.IR alSynSetVol (3P),
.IR alSynSetFXMix (3P),
.IR alSynStartVoice (3P),
.IR alAudioFrame (3p)