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.
SoundComponentPlaySourceBuffer
A sound component must implement theSoundComponentPlaySourceBuffer
function. The Sound Manager calls this function to start a new sound playing.
pascal ComponentResult SoundComponentPlaySourceBuffer (ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions);
ti
- A component instance that identifies your sound component.
sourceID
- A source ID for a source component chain.
pb
- A pointer to a sound parameter block.
actions
- A set of 32 bit flags that describe the actions to be taken when preparing to play the source data. See "Action Flags" on page 5-27 for a description of the constants you can use to select bits in this parameter.
DESCRIPTION
YourSoundComponentPlaySourceBuffer
function is called by the Sound Manager to start a new sound playing. The sound parameter block pointed to by thepb
parameter specifies the sound to be played. That parameter block should be passed successively to all sound components in the chain specified by thesourceID
parameter. This allows the components to determine their output formats and playback settings and to prepare for a subsequent call to theirSoundComponentGetSourceData
function. It also allows a sound output device component to prepare for starting up its associated hardware.RESULT CODES
YourSoundComponentPlaySourceBuffer
function should returnnoErr
if successful or an appropriate result code otherwise.