Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 5 - Sound Components / Sound Components Reference
Sound Component-Defined Routines / Getting and Setting Sound Component Information


Legacy Documentclose button

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.

SoundComponentSetInfo

A sound component must implement the SoundComponentSetInfo function. The Sound Manager calls this function to modify settings of your component.

pascal ComponentResult SoundComponentSetInfo 
                           (ComponentInstance ti, 
                              SoundSource sourceID,
                              OSType selector, void *infoPtr);
ti
A component instance that identifies your sound component.
sourceID
A source ID for a source component chain.
selector
A sound component information selector. See "Sound Component Information Selectors" beginning on page 5-22 for a description of the available selectors.
infoPtr
A pointer to the information your component is to use to modify its settings. If the information occupies 4 or fewer bytes, however, this parameter contains the information itself, not the address of the information.
DESCRIPTION
Your SoundComponentSetInfo function is called by the Sound Manager to set one of the settings for your component, as specified by the selector parameter. If the information associated with that selector occupies 4 or fewer bytes, it is passed on the stack, in the infoPtr parameter itself. Otherwise, the infoPtr parameter is a pointer to a structure of type SoundInfoList. See the description of SoundComponentGetInfo for more information about the SoundInfoList structure.

If your component cannot modify the settings specified by the selector parameter, it should pass the selector to its source component.

RESULT CODES
Your SoundComponentSetInfo function should return noErr if successful or an appropriate result code otherwise.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996