Title Banner

Previous Book Contents Book Index Next

Newton Developer Technical Information: Newton Programmer's Guide: 2.1 OS Addendum /
Chapter 7 - Sound / Sound Reference
Functions /


PlaySound

PlaySound(soundFrame)

Plays a sound asynchronously.

soundFrame
The sound frame to be played. For details, see "Sound Frame". Or you can specify a binary object of the class 'TDTMFCodec, which contains synthesizer data. In this case, the synthesized sound is played by the synthesizer codec.

return value
Undefined; do not rely on it.

DISCUSSION

The sound is played asynchronously; that is, this function returns immediately and the sound is played as a background process. When the sound is finished playing, the system calls the callback function in soundFrame, if it's defined.

When passed a binary object of the class 'TDTMFCode, and containing synthesizer data, *PlaySound is a shortcut for invoking the synthesizer codec to play the sound. This shortcut works for the whole family of *PlaySoundxxx functions.

Note that *PlaySound is not a new function in the Newton 2.1 OS. It was inadvertently omitted from the Sound chapter in Newton Programmer's Guide for Newton 2.0 and Newton Programmer's Reference. This function was documented for the 1.x system, still works the same under the 2.1 OS, and is documented again in this chapter for completeness.

SEE ALSO

For more information about the limitations of this function, see "PlaySound Errata".

For more information about using the synthesizer codec, see "Synthesizing Sound". For more information about the format of synthesized sound data, see "Synthesized Sound Data Format".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
26 APR 1997



Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help