FSOUND_Stream_Play

##### [API function]

## FSOUND_Stream_Play

Starts a pre-opened stream playing.

int F_API FSOUND_Stream_Play(
int channel,
FSOUND_STREAM *stream
);

### Parameters

channel | 0+ The channel index in the channel pool. This must not exceed the maximum number of channels allocated with FSOUND_Init FSOUND_FREE Chooses a free channel to play in. If all channels are used then it selects a channel with a sample playing that has a lower priority than the sample to be played.
stream | Pointer to the already opened stream to be played.

### Return Value

On success, the channel handle the stream is playing in is returned.
On failure, -1 is returned.

### Remarks

When a stream starts to play, it inherits a special high priority (256).
It cannot be rejected by other sound effect channels in the normal fashion as the user can never set a priority above 255 normally.
--------------
If the stream has been opened with FSOUND_NONBLOCKING, this function will not succeed until the stream is ready.
--------------
FSB streaming is not supported if the format from FSBank is 'Retain original format'. On PC platforms, only PCM and ADPCM FSB files are allowed.
--------------
FSOUND_STEREOPAN is recommended for stereo streams if you call FSOUND_SetPan. This puts the left and right channel to full volume.
Otherwise a normal pan will give half volume for left and right. See FSOUND_SetPan for more information on this.
--------------
You can use normal channel based commands (such as FSOUND_SetVolume etc) on the return handle, as it is a channel handle.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

### See Also

FSOUND_GetNumSubChannels , FSOUND_GetSubChannel , FSOUND_Init , FSOUND_SetPan , FSOUND_SetVolume , FSOUND_Stream_Close , FSOUND_Stream_Create , FSOUND_Stream_Net_GetBufferProperties , FSOUND_Stream_Net_GetLastServerStatus , FSOUND_Stream_Net_GetStatus , FSOUND_Stream_Net_SetBufferProperties , FSOUND_Stream_Net_SetMetadataCallback , FSOUND_Stream_Net_SetProxy , FSOUND_Stream_Net_SetTimeout , FSOUND_Stream_Open , FSOUND_Stream_PlayEx , FSOUND_Stream_SetEndCallback , FSOUND_Stream_SetLoopCount , FSOUND_Stream_SetSubStream , FSOUND_Stream_SetSubStreamSentence , FSOUND_Stream_SetSyncCallback , FSOUND_Stream_Stop

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Thu Dec 15 17:31:36 2005 by SourceDoc v0.10, the automated source code documenter.