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 theDisposeSpeechChannel
function to dispose of an existing speech channel.
FUNCTION DisposeSpeechChannel (chan: SpeechChannel): OSErr;
chan
- The speech channel to dispose of.
DESCRIPTION
TheDisposeSpeechChannel
function disposes of the speech channel specified in thechan
parameter and releases all memory the channel occupies. If the speech channel specified is producing speech, then theDisposeSpeechChannel
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 theDisposeSpeechChannel
function might purge memory, you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for theDisposeSpeechChannel
function are
Trap macro Selector _SoundDispatch
$021C000C RESULT CODES
noErr
0 No error invalidComponentID -3000 Speech channel is uninitialized or bad