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.
GetVoiceDescription
You can obtain a description of a voice by using theGetVoiceDescriptionfunction.
FUNCTION GetVoiceDescription (voice: VoiceSpecPtr; info: VoiceDescriptionPtr; infoLength: LongInt): OSErr;
voice- A pointer to the voice specification record identifying the voice to be described, or
NULLto obtain a description of the system default voice.
info- A pointer to a voice description record. If this parameter is
NULL, the function does not fill in the fields of the voice description record; instead, it simply determines whether thevoiceparameter specifies an available voice and, if not, returns avoiceNotFounderror.
infoLength- The length, in bytes, of the voice description record. In the current version of the Speech Manager, the voice description record contains 362 bytes. However, you should always use the
SizeOffunction to determine the length of this record.DESCRIPTION
TheGetVoiceDescriptionfunction fills out the voice description record pointed to by theinfoparameter with the correct information for the voice specified by thevoiceparameter. It fills in thelengthfield of the voice description record with the number of bytes actually copied. This value will always be less than or equal to the value that your application passes ininfoLengthbefore callingGetVoiceDescription. This scheme allows applications targeted for the current version of the Speech Manager to work on future versions that might have longer voice description records; it also allows you to write code for future versions of the Speech Manager that will also run on computers that support only the current version.If the voice specification record does not identify an available voice,
GetVoiceDescriptionreturns avoiceNotFounderror.SPECIAL CONSIDERATIONS
Because theGetVoiceDescriptionfunction moves memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theGetVoiceDescriptionfunction are
Trap macro Selector _SoundDispatch$0610000C RESULT CODES
noErr 0 No error paramErr -50 Parameter error memFullErr -108 Not enough memory to load voice into memory voiceNotFound -244 Voice resource not found 
 
  
  
 