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 N
Returns 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)
- Having Trouble with exit(1) - Stalling Program
- Finding zero crossings in a sample (to eliminate clicking)
- Allegro Crashes With USB Audio Attached and Set as Default...
- Difficulty compiling on Windows
- Screen is cleared and a new one appears Allegro5 in C?
- Allegro GTK3 and Mac
- Audio Stream: Seeking doesn't work
- [A5] al_play_sample isn't always playing sound
Other recent discussions:
- Calling al_install_audio from a DLL?
- Creating executable files in Visual Studio
- Problem in Allegro 5.2.4 Timer!
- Depth bug (Allegro 5 + Opengl)
- Audio seems overly complicated :(
- Video Addon
- Error Message when program finishes
- video & physfs problems in the same file
- This Place Just Doesn't Die
- Input response times for controllers