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 theSoundComponentInitOutputDevicefunction. 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
YourSoundComponentInitOutputDevicefunction 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 yourOpenComponentfunction. Note that yourOpenComponentfunction cannot assume that the appropriate hardware is available. As a result, the Sound Manager calls yourSoundComponentInitOutputDevicefunction when it is safe to communicate with your audio hardware. You can call theOpenMixerSoundComponentfunction to create a single sound component chain.SPECIAL CONSIDERATIONS
YourSoundComponentInitOutputDevicefunction is always called at noninterrupt time. All other component-defined routines might be called at interrupt time. Accordingly, yourSoundComponentInitOutputDevicefunction should handle any remaining memory allocation needed by your component and it should lock down any relocatable blocks your component will access.RESULT CODES
YourSoundComponentInitOutputDevicefunction should returnnoErrif successful or an appropriate result code otherwise.SEE ALSO
See Listing 5-4 on page 5-17 for a sampleSoundComponentInitOutputDevicefunction.