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.
SoundComponentAddSource
A sound output device component that can mix multiple channel of audio data must implement theSoundComponentAddSourcefunction to add a new sound source.
pascal ComponentResult SoundComponentAddSource (ComponentInstance ti, SoundSource *sourceID);
ti- A component instance that identifies your sound component.
sourceID- On exit, a source ID for the newly created source component chain.
DESCRIPTION
TheSoundComponentAddSourcefunction is called by the Sound Manager to create a new sound source. If your sound output device component can mix multiple channels of sound, it needs to define this function. YourSoundComponentAddSourcefunction should call the Sound Manager functionOpenMixerSoundComponentto create an new instance of the Apple Mixer component. The Apple Mixer component then creates a sound component chain capable of generating the type of data your sound output device component wants to receive.The Apple Mixer also assigns a unique 4-byte source ID that identifies the new sound source and component chain. You can retrieve that source ID by calling the Apple Mixer's
SoundComponentAddSourcefunction. YourSoundComponentAddSourcefunction should then pass that source ID back to the Sound Manager in thesourceIDparameter.
- IMPORTANT
- Most sound components do not need to implement the
SoundComponentAddSourcefunction. Only sound components that can handle more than one source of input need to define it.![]()
SPECIAL CONSIDERATIONS
TheSoundComponentAddSourcefunction is called at noninterrupt time.RESULT CODES
YourSoundComponentAddSourcefunction should returnnoErrif successful or an appropriate result code otherwise.SEE ALSO
See page 5-33 for a description ofOpenMixerSoundComponent.