Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager / Speech Manager Reference
Speech Manager Routines / Obtaining Information About Voices


Legacy Documentclose button

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.

CountVoices

You can determine how many voices are available by calling the CountVoices function.

FUNCTION CountVoices (VAR numVoices: Integer): OSErr;
numVoices
On exit, the number of voices that the application can use.
DESCRIPTION
The CountVoices function returns, in the numVoices parameter, the number of voices available. The application can then use this information to call the GetIndVoice function, described next, to obtain voice specification records for one or more of the voices.

Each time CountVoices is called, the Speech Manager searches for new voices.

SPECIAL CONSIDERATIONS
Because the CountVoices function moves memory, you should not call it at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the CountVoices function are
Trap macroSelector
_SoundDispatch$0108000C

RESULT CODES
noErr0No error

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996