alSynStartVoiceParam.3p
2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
.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)