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.
GetSoundPreference
A sound component can use theGetSoundPreference
function to have the Sound Manager read a block of preferences data from a resource file. You'll use it to retrieve a block of preferences data you previously saved by callingSetSoundPreference
.
pascal OSErr GetSoundPreference (OSType type, Str255 name, Handle settings);
type
- The resource type of the preferences resource.
name
- The resource name of the preferences resource.
settings
- A handle to the data in the preferences resource.
DESCRIPTION
TheGetSoundPreference
function retrieves the block of preferences data you previously stored in a resource by calling theSetSoundPreference
function. It is the responsibility of your component to allocate the block of data referenced by thesettings
handle. The Sound Manager resizes the handle (if necessary) and fills it with data from the resource with the specified type and name. Your sound component should dispose of the handle once it's finished reading the data from it. You can determine the size of the handle returned by the Sound Manager by calling the Memory Manager'sGetHandleSize
function.SPECIAL CONSIDERATIONS
TheGetSoundPreference
function is available only in versions 3.0 and later of the Sound Manager.