BASSmix

BASS_Mixer_ChannelFlags


Modifies and retrieves a channel's mixer flags.

DWORD BASS_Mixer_ChannelFlags(
    DWORD handle,
    DWORD flags,
    DWORD mask
);

Parameters

handleThe channel handle.
flagsA combination of these flags.
BASS_MIXER_BUFFERBuffer the sample data, for use by BASS_Mixer_ChannelGetData and BASS_Mixer_ChannelGetLevel and BASS_Mixer_ChannelGetLevelEx.
BASS_MIXER_LIMITLimit 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_NORAMPINDo not ramp-in the start, including after seeking (BASS_Mixer_ChannelSetPosition).
BASS_MIXER_PAUSEPause processing of the source.
BASS_STREAM_AUTOFREEAutomatically free the source channel when it ends.
BASS_SPEAKER_xxxSpeaker assignment flags. If matrix mixing is enabled, then the matrix will be modified to place the source on the requested speaker(s).
maskThe 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 the BASS_SPEAKER_xxx flags 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_HANDLEThe channel is not plugged into a mixer.
BASS_ERROR_SPEAKERThe mixer does not support the requested speaker(s), or the channel has matrix mixing enabled.

Remarks

This function only deals with the channel's mixer related flags. The channel's standard flags, for example looping (BASS_SAMPLE_LOOP), are unaffected; use BASS_ChannelFlags to modify them.

Example

Disable ramping-in of a channel.
BASS_Mixer_ChannelFlags(channel, BASS_MIXER_NORAMPIN, BASS_MIXER_NORAMPIN); // set NORAMPIN flag

Enable ramping-in of a channel.

BASS_Mixer_ChannelFlags(channel, 0, BASS_MIXER_NORAMPIN); // remove NORAMPIN flag

See also

BASS_Mixer_StreamAddChannel