1al_lock_sample_id(3) al_lock_sample_id(3)
2
3
4
6 al_lock_sample_id - Allegro 5 API
7
9 #include <allegro5/allegro_audio.h>
10
11 ALLEGRO_SAMPLE_INSTANCE* al_lock_sample_id(ALLEGRO_SAMPLE_ID *spl_id)
12
14 Locks a ALLEGRO_SAMPLE_ID(3), returning the underlying ALLEGRO_SAM‐
15 PLE_INSTANCE(3). This allows you to adjust the various properties of
16 the instance (such as volume, pan, etc) while the sound is playing.
17
18 This function will return NULL if the sound corresponding to the id is
19 no longer playing.
20
21 While locked, ALLEGRO_SAMPLE_ID will be unavailable to additional calls
22 to al_play_sample(3), even if the sound stops while locked. To put the
23 ALLEGRO_SAMPLE_ID back into the pool for reuse, make sure to call
24 al_unlock_sample_id when you’re done with the instance.
25
27 al_play_sample(3), al_unlock_sample_id(3)
28
30 5.2.3
31
32 [Unstable API]: New API.
33
34
35
36Allegro reference manual al_lock_sample_id(3)