![]() |
SoundComponentGetSourceData |
||||
Header: | Sound.h | Carbon status: | Supported | |
Generates more data. A utility component must implement the SoundComponentGetSourceData function.
ComponentResult SoundComponentGetSourceData ( ComponentInstance ti, SoundComponentDataPtr *sourceData );
A component instance that identifies your sound component.
On return, a pointer to a sound component data structure that specifies the type and location of the data your component has processed.
Returns noErr if successful or an appropriate result code otherwise.
Your SoundComponentGetSourceData function is called when the sound component immediately following your sound component in the sound component chain needs more data. Your function should generate a new block of audio data, fill out a sound component data structure describing the format and location of that data, and then return the address of that structure in the sourceData parameter.
Your SoundComponentGetSourceData function might itself need to get more data from its source component. To do this, call through to the source components SoundComponentGetSourceData function. If your component cannot generate any more data, it should set the sampleCount field of the sound component data structure to 0 and return noErr.
Sound output device components do not need to implement this function, but all utility components must implement it.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)