al_reserve_samples
bool al_reserve_samples(int reserve_samples)
Introduced in 5.0.0
Reserves a number of sample instances, attaching them to the default mixer. If no default mixer is set when this function is called, then it will automatically create a voice with an attached mixer, which becomes the default mixer. This diagram illustrates the structures that are set up:
sample instance 1
/ sample instance 2
voice <-- default mixer <--- .
\ .
sample instance NReturns true on success, false on error. al_install_audio must have been called first.
See also: al_set_default_mixer, al_play_sample
Examples: ex_audio_props, ex_audio_simple, ex_haiku, ex_saw, ex_stream_seek, ex_synth
Most helpful discussions:
- [A5] Audio Streams (2)
- [A5/OSX] Sound not playing (2)
- Cannot create an ALLEGRO_VOICE object in Allegro5
- Bitmap behind mappy map
- How to play video in allegro 5
- Dsound undefined reference error when compiling using 5.2.1 binaries
- Why would al_install_audio() suddenly stop working?
- Delay when playing a sound effect using "al_play_sample"
- Segmentation fault al_map_rgb
- Audio addon: pause sample
Other recent discussions:
- Successful but silent audio playback
- al_reserve_samples
- How to get raw sample frequencies
- [A5] troubles with Ogg
- crash when calling "al_reserve_samples"
- Passing objects via functions
- Blank Screen
- [A4/A5] Homemade Audio Primer
- ALLEGRO_RESIZABLE & Mouse Pointer Collision Detection
- [OSX 10.9] Audio somehow freezes program a few seconds on exit