Allocates a synthesizer voice
#include <libaudio.h> /* libaudio.h */ s32 *alSynAllocVoice( ALSynth *drvr, ALVoiceConfig *vc);#include <n_libaudio.h> /* n_libaudio.h */ s32 n_alSynAllocVoice(N_ALVoice *voice, ALVoiceConfig *vc);
It uses an argument specified in the voice configuration structure to allocate to virtual voice. It returns the pointer to a voice structure when it is possible to allocate virtual voice. If it fails to allocate, alSynAllocVoice returns 0. If there are no physical voices available, it tries to steal a physical voice from another virtual voice. To do this, it searches the list of voices and steals the physical voice with the lowest priority voice that is equal to or lower than the priority specified in the configuration structure. If no physical voice is found with an equal or lower priority alSynAllocVoice, it returns the pointer to the virtual voice, and no new voice will be pronounced. Note that voice stealing occurs only when there are more virtual voices than physical voices.
The arguments in the ALVoiceConfig structure are as follows:
Call alSynAllocVoice only from within the ALVoiceHandler.
alSynFreeVoice, alSynStartVoice, and alSynStopVoice
1999/04/30 Changed Format