alSynStartVoice.3p
2 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
.TH alSynStartVoice 3P local "Silicon Graphics, Inc."
.SH NAME
.upperok
alSynStartVoice \- start synthesizing audio samples with the specified voice.
.SH SYNOPSIS
.nf
\f3
.Op c
#include <libaudio.h>
.sp .8v
void alSynStartVoice(ALSynth *drvr, ALVoice *voice, ALWaveTable *table);
.Op
\f1
.fi
.SH PARAMETERS
.TP 10
.I drvr
pointer to the synthesizer driver.
.TP
.I voice
pointer to a voice.
.TP
.I table
pointer to a sound wavetable.
.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.
Before calling alSynStartVoice, 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 alSynStartVoice. Before starting a
voice, the pitch, pan, fxmix, and volume should be set. Alternatively,
alSynStartVoiceParam may be used. When the voice is no longer 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, alSynStartVoice 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 alSynStartVoiceParam (3P),
.IR alAudioFrame (3p)