Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager / Speech Manager Reference
Speech Manager Routines / Managing Speech Channels


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.

DisposeSpeechChannel

You can use the DisposeSpeechChannel function to dispose of an existing speech channel.

FUNCTION DisposeSpeechChannel (chan: SpeechChannel): OSErr;
chan
The speech channel to dispose of.
DESCRIPTION
The DisposeSpeechChannel function disposes of the speech channel specified in the chan parameter and releases all memory the channel occupies. If the speech channel specified is producing speech, then the DisposeSpeechChannel function immediately stops speech before disposing of the channel. If you have defined a text-done callback procedure or a speech-done callback procedure, the procedure will not be called before the channel is disposed of.

The Speech Manager releases any speech channels that have not been explicitly disposed of by an application when the application quits. In general, however, your application should dispose of any speech channels it has created whenever it receives a suspend event. This ensures that other applications can take full advantage of Speech Manager and Sound Manager capabilities.

SPECIAL CONSIDERATIONS
Because the DisposeSpeechChannel function might purge memory, you should not call it at interrupt time.

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

RESULT CODES
noErr0No error
invalidComponentID-3000Speech channel is uninitialized or bad

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996