Previous Book Contents Book Index Next

Inside Macintosh: Sound /
Chapter 5 - Sound Components / Sound Components Reference
Sound Component-Defined Routines / Managing Sound Components


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.

SoundComponentInitOutputDevice

A sound output device component must implement the SoundComponentInitOutputDevice function. The Sound Manager calls this function to allow a sound output device component to configure any associated hardware devices.

pascal ComponentResult SoundComponentInitOutputDevice 
                           (ComponentInstance ti, long actions);
ti
A component instance that identifies your sound component.
actions
A set of flags. This parameter is currently unused.
DESCRIPTION
Your SoundComponentInitOutputDevice function is called by the Sound Manager at noninterrupt time to allow your sound output device component to perform any hardware-specific initialization. You should perform any necessary initialization that was not already performed in your OpenComponent function. Note that your OpenComponent function cannot assume that the appropriate hardware is available. As a result, the Sound Manager calls your SoundComponentInitOutputDevice function when it is safe to communicate with your audio hardware. You can call the OpenMixerSoundComponent function to create a single sound component chain.

SPECIAL CONSIDERATIONS
Your SoundComponentInitOutputDevice function is always called at noninterrupt time. All other component-defined routines might be called at interrupt time. Accordingly, your SoundComponentInitOutputDevice function should handle any remaining memory allocation needed by your component and it should lock down any relocatable blocks your component will access.

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

SEE ALSO
See Listing 5-4 on page 5-17 for a sample SoundComponentInitOutputDevice function.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996