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 theSoundComponentGetSource
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
YourSoundComponentGetSource
function is called by the Sound Manager to retrieve your component's source component instance. Your component should return, in thesource
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 yourSoundComponentSetSource
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 thesource
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 thesource
parameter and a source ID in thesourceID
parameter. A utility component can ignore thesourceID
parameter.RESULT CODES
YourSoundComponentGetSource
function should returnnoErr
if successful or an appropriate result code otherwise.