Previous Topic Index Next Topic
[API function]

FSOUND_GetSubChannel

This function returns a channel handle from a subchannel within a multichannel FSB file, so that it can be maniuplated seperately, instead of controlling the whole multichannel array with the parent channel that the user retrieves from FSOUND_PlaySound etc.

int F_API FSOUND_GetSubChannel(
int channel,
int subchannel
);

Parameters

channel The value returned by FSOUND_Stream_Play, FSOUND_Stream_PlayEx, FSOUND_PlaySound, FSOUND_PlaySoundEx.
subchannel Offset from the parent channel into the multichannel array.

Return Value

On success, a raw channel handle is returned.
On failure, -1 is returned.

Remarks

A multichannel sound, only possible with the .FSB format, can contain multiple subchannels. When a multichannel sound is played, multiple channels are allocated at the same time.
Normally you can just use the parent handle, and things like FSOUND_SetVolume will affect all subchannels at the same time. With this function, you can get access to the raw subchannels to allow manipulation of each voice seperately within the multichannel array.
For example, a 8 sounds/streams can be interleaved into a multichannel FSB. If you specified a subchannel of 7, it would return a channel handle to the last channel in the multichannel array.
A subchannel index of 0 is the parent channel, and the same as the voice passed in is a parameter.
The number of subchannels within a multichannel voice can be determined with FSOUND_GetNumSubChannels.
___________________
Supported on the following platforms : Win32, WinCE, Linux, Macintosh, XBox, PlayStation 2, GameCube

See Also

FSOUND_GetNumSubChannels , FSOUND_PlaySound , FSOUND_PlaySoundEx , FSOUND_SetVolume , FSOUND_Stream_Play , FSOUND_Stream_PlayEx

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