Title Banner

Previous Book Contents Book Index Next

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


Using the Sound Registry

There is a sound registry that you can use to register new sounds that the user can choose as the system alert sound (in the Sound preferences slip). Use the global function *RegSound to register a new sound with the system under a unique symbol. Remember to append your developer signature to the symbols identifying any sounds that you register. To unregister a sound, use *UnRegSound.

You can get a list of all registered sounds by calling *SoundList. This function returns an alphabetized array of sounds suitable for use directly in a picker list. The array contains a series of frames; each frame contains an item slot with the name of the sound, and a soundSymbol slot containing the unique symbol identifying the sound. Note that there are several built-in sounds listed in the array, in addition to any custom sounds that have been registered.

The function *GetRegisteredSound is used to return the sound frame for a registered sound. You pass this function the symbol under which the sound was registered and it returns the sound frame. If the symbol you pass is not found in the registry, the system returns the simpleBeep sound frame.

Note
These global functions exist in both the Newton 2.0 and 2.1 operating systems. They were not previously documented for 2.0.

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