.\" Generated by the Allegro makedoc utility .TH allocate_voice 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME allocate_voice \- Allocates a sound card voice for a sample. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B int allocate_voice(const SAMPLE *spl); .SH DESCRIPTION Allocates a sound card voice and prepares it for playing the specified sample, setting up sensible default parameters (maximum volume, centre pan, no change of pitch, no looping). When you are finished with the voice you must free it by calling deallocate_voice() or release_voice(). Allegro can manage up to 256 simultaneous voices, but that limit may be lower due to hardware reasons. .SH "RETURN VALUE" Returns the voice number, or -1 if no voices are available. .SH SEE ALSO .BR deallocate_voice (3alleg4), .BR reallocate_voice (3alleg4), .BR release_voice (3alleg4), .BR load_sample (3alleg4)