Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 5 - Sound Components / Sound Components Reference
Sound Component-Defined Routines / Managing Sound Components


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.

SoundComponentGetSource

A sound component can implement the SoundComponentGetSource function. The Sound Manager calls this function to determine your component's source component.

pascal ComponentResult SoundComponentGetSource 
                           (ComponentInstance ti, 
                              SoundSource sourceID, 
                              ComponentInstance *source);
ti
A component instance that identifies your sound component.
sourceID
A source ID for the source component chain created by the Apple Mixer.
source
A component instance that identifies your source component.
DESCRIPTION
Your SoundComponentGetSource function is called by the Sound Manager to retrieve your component's source component instance. Your component should return, in the source parameter, the component instance of your component's source. This should be the source component instance your component was passed when the Sound Manager called your SoundComponentSetSource function.

In general, all sound components have sources, except for the source at the beginning of the source component chain. In the unlikely event that your component does not have a source, you should return nil in the source parameter. A sound output device component is always connected directly to an instance of the Apple Mixer. Accordingly, a sound output device component should return a component instance of the Apple Mixer in the source parameter and a source ID in the sourceID parameter. A utility component can ignore the sourceID parameter.

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


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996