AudioStreamer::AddComponent
Defined in:
Adds a component to an audio streamer.
C4Sound.h
Prototype
SoundResult AddComponent(const char *name);
Parameters
name |
The name of the sound resource. |
Description
The AddComponent
function adds the resource specified by the name
parameter to the list of sound resources that will be streamed. If the resource cannot be opened, then an error is returned. If the resource is successfully opened, then the return value is kSoundOkay
.Sounds will be played in the order in which they are specified through calls to
AddComponent
. When the end of one resource is reached, the stream continues immediately at the beginning of the next resource. The same resource name can be specified for multiple calls to the AddComponent
function, if desired.Each sound resource specified for an
AudioStreamer
object must be stored in compressed format (mono or stereo). Otherwise, the result code kSoundFormatInvalid
is returned.