Carbon


SoundComponentPlaySourceBuffer

Header: Sound.h Carbon status: Supported

Starts a new sound playing. A sound output device component must implement the SoundComponentPlaySourceBuffer function.

ComponentResult SoundComponentPlaySourceBuffer (
    ComponentInstance ti, 
    SoundSource sourceID, 
    SoundParamBlockPtr pb, 
    SInt32 actions
);
Parameter descriptions
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” for a description of the constants you can use to select bits in this parameter.

function result

Returns noErr if successful or an appropriate result code otherwise.

DISCUSSION

Your SoundComponentPlaySourceBuffer function is called by the Sound Manager to start a new sound playing. The sound parameter block pointed to by the pb parameter specifies the sound to be played. That parameter block should be passed successively to all sound components in the chain specified by the sourceID parameter. This allows the components to determine their output formats and playback settings and to prepare for a subsequent call to their SoundComponentGetSourceData function. It also allows a sound output device component to prepare for starting up its associated hardware.

AVAILABILITY

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)