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.
SoundComponentGetSourceData
A utility component must implement theSoundComponentGetSourceDatafunction. A sound output device component calls this function on its source component when it needs more data.
pascal ComponentResult SoundComponentGetSourceData (ComponentInstance ti, SoundComponentDataPtr *sourceData);
ti- A component instance that identifies your sound component.
sourceData- On output, a pointer to a sound component data record that specifies the type and location of the data your component has processed.
DESCRIPTION
YourSoundComponentGetSourceDatafunction 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 record describing the format and location of that data, and then return the address of that record in thesourceDataparameter.Your
SoundComponentGetSourceDatafunction might itself need to get more data from its source component. To do this, call through to the source component'sSoundComponentGetSourceDatafunction. If your component cannot generate any more data, it should set thesampleCountfield of the sound component data record to 0 and returnnoErr.
- IMPORTANT
- Sound output device components do not need to implement this function, but all utility components must implement it.
![]()
RESULT CODES
YourSoundComponentGetSourceDatafunction should returnnoErrif successful or an appropriate result code otherwise.