Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 1 - Introduction to Sound on the Macintosh / Sound Reference
Routines / Generating and Stopping Speech


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.

SpeechBusy

You can use the SpeechBusy function to determine whether any channels of speech are currently synthesizing speech.

FUNCTION SpeechBusy: Integer;
DESCRIPTION
The SpeechBusy function returns the number of speech channels that are currently synthesizing speech in the application. This is useful when you want to ensure that an earlier speech request has been completed before having the system speak again. Note that paused speech channels are counted among those that are synthesizing speech.

The speech channel that the Speech Manager allocates internally in response to calls to the SpeakString function is counted in the number returned by SpeechBusy. Thus, if you use just SpeakString to initiate speech, SpeechBusy always returns 1 as long as speech is being produced. When SpeechBusy returns 0, all initiated speech has finished.

SPECIAL CONSIDERATIONS
You can call the SpeechBusy function at interrupt time.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for the SpeechBusy function are
Trap macroSelector
_SoundDispatch$003C000C


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996