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 theSoundComponentAddSource
function 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
TheSoundComponentAddSource
function 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. YourSoundComponentAddSource
function should call the Sound Manager functionOpenMixerSoundComponent
to 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
SoundComponentAddSource
function. YourSoundComponentAddSource
function should then pass that source ID back to the Sound Manager in thesourceID
parameter.
- IMPORTANT
- Most sound components do not need to implement the
SoundComponentAddSource
function. Only sound components that can handle more than one source of input need to define it.SPECIAL CONSIDERATIONS
TheSoundComponentAddSource
function is called at noninterrupt time.RESULT CODES
YourSoundComponentAddSource
function should returnnoErr
if successful or an appropriate result code otherwise.SEE ALSO
See page 5-33 for a description ofOpenMixerSoundComponent
.