BASS.NET API for the Un4seen BASS Audio LibraryBassMixBASS_Mixer_ChannelFlags Method BASS.NET API for the Un4seen BASS Audio Library
Modifies and/or retrieves a channel's mixer flags.

Namespace: Un4seen.Bass.AddOn.Mix
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

[DllImportAttribute("bassmix.dll", CharSet = CharSet.Unicode)]
public static BASSFlag BASS_Mixer_ChannelFlags(
	int handle,
	BASSFlag flags,
	BASSFlag mask
)

Parameters

handle
Type: SystemInt32
The handle of the mixer source channel to modify (which was add via BASS_Mixer_StreamAddChannel(Int32, Int32, BASSFlag) or BASS_Mixer_StreamAddChannel(Int32, Int32, BASSFlag) or BASS_Mixer_StreamAddChannelEx(Int32, Int32, BASSFlag, Int64, Int64)) beforehand).
flags
Type: Un4seen.BassBASSFlag
Any combination of these flags (see BASSFlag):
BASS_MIXER_BUFFERBuffer the sample data, for use by BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32).
BASS_MIXER_NORAMPINDon't ramp-in the start, including after seeking (BASS_Mixer_ChannelSetPosition(Int32, Int64, BASSMode)). This is useful for gap-less playback, where a source channel is intended to seamlessly follow another. This does not affect volume and pan changes, which are always ramped.
BASS_MIXER_PAUSEDon't process the source channel (paused mode).
BASS_STREAM_AUTOFREEAutomatically free the source channel when it ends. This allows you to add a channel to a mixer and forget about it, as it will automatically be freed when it has reached the end, or when the source is removed from the mixer or when the mixer is freed.
BASS_SPEAKER_xxxSpeaker assignment flags.
mask
Type: Un4seen.BassBASSFlag
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 (BASS_DEFAULT) 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

Type: BASSFlag
If successful, the channel's updated flags are returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
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(Int32, BASSFlag, BASSFlag) to modify them.

ERROR CODEDescription
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.

Examples

VB
' Disable ramping-in of a channel:
BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_MIXER_NORAMPIN, BASSFlag.BASS_MIXER_NORAMPIN)

' Enable ramping-in of a channel:
BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_DEFAULT, BASSFlag.BASS_MIXER_NORAMPIN)
// Disable ramping-in of a channel:
BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_MIXER_NORAMPIN, BASSFlag.BASS_MIXER_NORAMPIN);

// Enable ramping-in of a channel:
BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_DEFAULT, BASSFlag.BASS_MIXER_NORAMPIN);
See Also

Reference