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 theGetSpeechInfo
function with thesoErrors
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. TheSpeechErrorInfo
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;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.
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 thesoErrors
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 thesoErrors
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 thesoErrors
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.
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 thesoErrors
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.