Important: Inside Macintosh: Sound is deprecated as of Mac OS X v10.5. For new audio development in Mac OS X, use Core Audio. See the Audio page in the ADC Reference Library.
GetIndVoice
You can obtain a voice specification record for a voice by passing an index to theGetIndVoice
function.
FUNCTION GetIndVoice (index: Integer; voice: VoiceSpecPtr): OSErr;
index
- The index of the voice for which to obtain a voice specification record. This number must range from 1 to the total number of voices, as returned by the
CountVoices
function.voice
- A pointer to the voice specification record whose fields are to be filled in.
DESCRIPTION
TheGetIndVoice
function returns, in the voice specification record pointed to by thevoice
parameter, a specification of the voice whose index is provided in theindex
parameter. Your application should make no assumptions about the order in which voices are indexed.
If you specify an index value beyond the number of available voices, the
- WARNING
- Your application should not add, remove, or modify a voice and then call the
GetIndVoice
function with an index value other than 1. To allow the Speech Manager to update its information about voices, your application should always either call theCountVoices
function or call theGetIndVoice
function with an index value of 1 after adding, removing, or modifying a voice or after a time at which the user might have done so.GetIndVoice
function returns avoiceNotFound
error.SPECIAL CONSIDERATIONS
Because theGetIndVoice
function moves memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetIndVoice
function are
Trap macro Selector _SoundDispatch
$030C000C RESULT CODES
noErr 0 No error voiceNotFound -244 Voice resource not found