1allocate_voice(3) Allegro manual allocate_voice(3)
2
3
4
6 allocate_voice - Allocates a sound card voice for a sample. Allegro
7 game programming library.
8
10 #include <allegro.h>
11
12
13 int allocate_voice(const SAMPLE *spl);
14
16 Allocates a sound card voice and prepares it for playing the specified
17 sample, setting up sensible default parameters (maximum volume, centre
18 pan, no change of pitch, no looping). When you are finished with the
19 voice you must free it by calling deallocate_voice() or
20 release_voice(). Allegro can manage up to 256 simultaneous voices, but
21 that limit may be lower due to hardware reasons.
22
24 Returns the voice number, or -1 if no voices are available.
25
26
28 deallocate_voice(3), reallocate_voice(3), release_voice(3), load_sam‐
29 ple(3)
30
31
32
33Allegro version 4.4.3 allocate_voice(3)