Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 4 - Speech Manager / Speech Manager Reference
Data Structures


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.

Speech Error Information Records

By calling the GetSpeechInfo function with the soErrors selector, you can obtain a speech error information record, which shows what Speech Manager errors occurred while processing a text buffer on a given speech channel. The SpeechErrorInfo data type defines a speech error information record.

TYPE SpeechErrorInfo =
RECORD
   count:      Integer;       {number of errors since last check}
   oldest:     OSErr;         {oldest unread error}
   oldPos:     LongInt;       {character position of oldest error}
   newest:     OSErr;         {most recent error}
   newPos:     LongInt;       {character position of newest error}
END;
Field Description
count
The number of errors that have occurred in processing the current text buffer since the last call to the GetSpeechInfo function with the soErrors selector. Of these errors, you can find information about only the first and last error that occurred.
oldest
The error code of the first error that occurred after the previous call to the GetSpeechInfo function with the soErrors selector.
oldPos
The character position within the text buffer being processed of the first error that occurred after the previous call to the GetSpeechInfo function with the soErrors selector.
newest
The error code of the most recent error.
newPos
The character position within the text buffer being processed of the most recent error.
Speech error information records never include errors that are returned by Speech Manager routines. Instead, they reflect only errors encountered directly in the processing of text, and, in particular, in the processing of commands embedded within text.

The speech error information record keeps track of only the most recent error and the first error that occurred after the previous call to the GetSpeechInfo function with the soErrors selector. If your application needs to keep track of all errors, then you should install an error callback procedure, as described in "Error Callback Procedure" beginning on page 4-86.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996