Carbon


SpeakBuffer

Header: SpeechSynthesis.h Carbon status: Supported

Speaks a buffer of text, using certain flags to control speech behavior.

OSErr SpeakBuffer (
    SpeechChannel chan, 
    const void *textBuf, 
    UInt32 textBytes, 
    SInt32 controlFlags
);
Parameter descriptions
chan

The speech channel through which speech is to be spoken.

textBuf

A pointer to the first byte of text to spoken.

textBytes

The number of bytes of text to spoken.

controlFlags

Control flags to customize speech behavior.

function result

A result code.

DISCUSSION

The SpeakBuffer function behaves identically to the SpeakText function, but allows control of several speech parameters by setting values of the controlFlags parameter. The controlFlags parameter relies on specific constants, which may be applied additively. See “Control Flags Constants”.

Each constant specifies a flag bit of the controlFlags parameter, so by passing the constants additively you can enable multiple capabilities of SpeakBuffer. If you pass 0 in the controlFlags parameter, SpeakBuffer works just like SpeakText. By passing kNoEndingProsody + kNoSpeechInterrupt in the controlFlags parameter, SpeakBuffer works like SpeakText except that the kNoEndingProsody and kNoSpeechInterrupt features have been selected. Future versions of the Speech Manager may define additional constants.

When the controlFlags parameter is set to 0, SpeakBuffer behaves identically to SpeakText.

SPECIAL CONSIDERATIONS

Because the SpeakBuffer function might move memory, you should not call it at interrupt time.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)