Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 5 - Sound Components / Sound Components Reference
Sound Component-Defined Routines / Creating and Removing Audio Sources


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.

SoundComponentRemoveSource

A sound output device component that implements the SoundComponentAddSource function must also implement the SoundComponentRemoveSource function to remove sound sources.

pascal ComponentResult SoundComponentRemoveSource 
                     (ComponentInstance ti, SoundSource sourceID);
ti
A component instance that identifies your sound component.
sourceID
A source ID for the source component chain to be removed.
DESCRIPTION
Your SoundComponentRemoveSource function is called by the Sound Manager to remove the existing sound source specified by the sourceID parameter. Your SoundComponentRemoveSource function should do whatever is necessary to invalidate that source and then call through to the Apple Mixer's SoundComponentRemoveSource function.

IMPORTANT
Most sound components do not need to implement the SoundComponentRemoveSource function. Only sound components that can handle more than one source of input need to define it.
SPECIAL CONSIDERATIONS
Your SoundComponentRemoveSource function is always called at noninterrupt time.

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


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996