logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

allocate_voice - Allocates a sound card voice for a sample. Allegro game programming library.

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.

Name

       allocate_voice - Allocates a sound card voice for a sample. Allegro game programming library.

Return Value

       Returns the voice number, or -1 if no voices are available.

See Also

deallocate_voice(3alleg4), reallocate_voice(3alleg4), release_voice(3alleg4), load_sample(3alleg4)

Allegro                                           version 4.4.3                          allocate_voice(3alleg4)

Synopsis

#include<allegro.h>intallocate_voice(constSAMPLE*spl);

See Also