1al_reserve_samples(3) al_reserve_samples(3)
2
3
4
6 al_reserve_samples - Allegro 5 API
7
9 #include <allegro5/allegro_audio.h>
10
11 bool al_reserve_samples(int reserve_samples)
12
14 Reserves a number of sample instances, attaching them to the default
15 mixer. If no default mixer is set when this function is called, then
16 it will create one and attach it to the default voice. If no default
17 voice has been set, it, too, will be created.
18
19 If you call this function a second time with a smaller number of sam‐
20 ples, then the excess internal sample instances will be destroyed caus‐
21 ing some sounds to stop and some instances returned by al_lock_sam‐
22 ple_id(3) to be invalidated.
23
24 This diagram illustrates the structures that are set up:
25
26 sample instance 1
27 / sample instance 2
28 default voice <-- default mixer <--- .
29 \ .
30 sample instance N
31
32 Returns true on success, false on error. al_install_audio(3) must have
33 been called first.
34
36 al_set_default_mixer(3), al_play_sample(3)
37
38
39
40Allegro reference manual al_reserve_samples(3)