1reserve_voices(3) Allegro manual reserve_voices(3)
2
3
4
6 reserve_voices - Reserve a number of voices for the digital and MIDI
7 drivers. Allegro game programming library.
8
10 #include <allegro.h>
11
12
13 void reserve_voices(int digi_voices, int midi_voices);
14
16 Call this function to specify the number of voices that are to be used
17 by the digital and MIDI sound drivers respectively. This must be done
18 _before_ calling install_sound(). If you reserve too many voices, sub‐
19 sequent calls to install_sound() will fail. How many voices are avail‐
20 able depends on the driver, and in some cases you will actually get
21 more than you reserve (eg. the FM synth drivers will always provide 9
22 voices on an OPL2 and 18 on an OPL3, and the SB digital driver will
23 round the number of voices up to the nearest power of two). Pass nega‐
24 tive values to restore the default settings. You should be aware that
25 the sound quality is usually inversely related to how many voices you
26 use, so don't reserve any more than you really need.
27
28
30 set_volume_per_voice(3), install_sound(3), detect_digi_driver(3),
31 detect_midi_driver(3), get_mixer_voices(3)
32
33
34
35Allegro version 4.4.3 reserve_voices(3)