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.
SoundComponentSetSource
A sound component can implement theSoundComponentSetSource
function. The Sound Manager calls this function to identify your component's source component.
pascal ComponentResult SoundComponentSetSource (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
YourSoundComponentSetSource
function is called by the Sound Manager to identify to your sound component the sound component that is its source. The source component is identified by thesource
parameter. Your component uses that information when it needs to obtain more data from its source (usually, by calling itsSoundComponentGetSourceData
function).Because a sound output device component is always connected directly to one or more instances of the Apple Mixer, the
SoundComponentSetSource
function needs to be implemented only by utility components (that is, components that perform modifications on sound data). Utility components are linked together into a chain of sound components, each link of which has only one input source. As a result, a utility component can usually ignore thesourceID
parameter passed to it.RESULT CODES
YourSoundComponentSetSource
function should returnnoErr
if successful or an appropriate result code otherwise.