Previous Topic Index Next Topic
[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.
--------
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.
--------
NOTE : WMA/ASF/Internet streams are a limited implementation because of the way the formats work.. Note the following limitations
- Multiple WMA/ASF/Internet streams streams are not supported.
- Playing WMA/ASF/Internet streams do not run through the software engine, and will not show up in the DSP output or spectrum.
- Streaming WMA/ASF from memory is not supported.
- WMA/ASF/Internet stream playback will always comes from primary sound device.
- WMA/ASF/Internet streams cannot loop, the flag will be ignored.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2

See Also

FSOUND_Init , FSOUND_SetPan , FSOUND_SetVolume , FSOUND_Stream_Close , FSOUND_Stream_Create , FSOUND_Stream_GetOpenState , FSOUND_Stream_OpenFile , FSOUND_Stream_PlayEx , FSOUND_Stream_SetEndCallback , FSOUND_Stream_SetSynchCallback , FSOUND_Stream_Stop

This document copyright ©Firelight Technologies, Pty, Ltd, 1999-2002. All rights reserved.
Generated Fri Dec 20 16:31:09 2002 by SourceDoc v0.10, the automated source code documenter.