Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager / Speech Manager Reference
Speech Manager Routines / Changing Speech Attributes


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.

GetSpeechInfo

You can use the GetSpeechInfo function to obtain information about a designated speech channel.

FUNCTION GetSpeechInfo (chan: SpeechChannel; selector: OSType;
                           speechInfo: Ptr): OSErr;
chan
The speech channel about which information is being requested.
selector
A speech information selector that indicates the type of information being requested.
speechInfo
A pointer whose meaning depends on the speech information selector specified in the selector parameter.
DESCRIPTION
The GetSpeechInfo function returns, in the data structure pointed to by the speechInfo parameter, the type of information requested by the selector parameter as it applies to the speech channel specified in the chan parameter.

The format of the data structure specified by the speechInfo parameter depends on the selector you choose. For example, a selector might require that your application allocate a block of memory of a certain size and pass a pointer to that block. Another selector might require that speechInfo be set to the address of a handle variable. In this case, the GetSpeechInfo function would allocate a relocatable block of memory and change the handle variable specified to reference the block.

SPECIAL CONSIDERATIONS
You can call the GetSpeechInfo function at interrupt time only if the speech information selector specified in the selector parameter does not move or purge memory.

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

RESULT CODES
noErr0No error
siUnknownInfoType-231Feature is not implemented on synthesizer
invalidComponentID-3000Speech channel is uninitialized or bad
SEE ALSO
For a complete list of speech information selectors, see "Speech Information Selectors" beginning on page 4-39. This list indicates how your application should set the speechInfo parameter for each selector and indicates which selectors might cause memory to be moved or purged.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996