BASS_Mixer_ChannelFlags
Modifies and retrieves a source channel's mixer flags.
DWORD BASS_Mixer_ChannelFlags(
DWORD handle,
DWORD flags,
DWORD mask
);
Parameters
| handle | The channel handle.
|
| flags | A combination of these flags.
| BASS_MIXER_CHAN_AUTOFREE | Automatically free the source channel when it ends.
| | BASS_MIXER_CHAN_BUFFER | Buffer the sample data, for use by BASS_Mixer_ChannelGetData and BASS_Mixer_ChannelGetLevel and BASS_Mixer_ChannelGetLevelEx.
| | BASS_MIXER_CHAN_DOWNMIX | Apply downmixing when switching SPEAKER flags or setting a default matrix with BASS_Mixer_ChannelSetMatrix. This flag is ignored if matrix mixing is not enabled.
| | BASS_MIXER_CHAN_LIMIT | Limit the mixer processing to the amount of data available from this source. This flag can only be applied to one source per mixer, so it will automatically be removed from any other source of the same mixer.
| | BASS_MIXER_CHAN_NORAMP | Do not ramp volume/pan/matrix changes.
| | BASS_MIXER_CHAN_NORAMPIN | Do not ramp-in the start or resumptions, including after seeking with BASS_Mixer_ChannelSetPosition.
| | BASS_MIXER_CHAN_PAUSE | Pause processing of the source.
| | BASS_MIXER_CHAN_RAMPOUT | Ramp-out when pausing.
| | BASS_SPEAKER_xxx | Speaker assignment flags. If matrix mixing is enabled then the matrix will be modified to place the source on the requested speaker(s).
|
|
| mask | The flags (as above) to modify. Flags that are not included in this are left as they are, so it can be set to 0 in order to just retrieve the current flags. To modify the SPEAKER flags, any of them can be used in the mask (no need to include all of them).
|
Return value
If successful, the channel's updated flags are returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Error codes
| BASS_ERROR_HANDLE | handle is not a mixer source.
|
| BASS_ERROR_SPEAKER | The mixer does not support the requested speaker(s), or you are attempting to assign a stereo source to a mono speaker.
|
Remarks
This function only deals with the channel's mixer related flags. The channel's standard flags are unaffected; use BASS_ChannelFlags to modify them.
When SPEAKER flags are combined with matrix mixing, they will be used to set the matrix and then discarded; they will not be returned by this function.
Example
Pause processing of a channel.
BASS_Mixer_ChannelFlags(channel, BASS_MIXER_CHAN_PAUSE, BASS_MIXER_CHAN_PAUSE); // set PAUSE flag
Resume processing of a paused channel.
BASS_Mixer_ChannelFlags(channel, 0, BASS_MIXER_CHAN_PAUSE); // unset PAUSE flag
See also
BASS_Mixer_StreamAddChannel