Modifies and/or retrieves a channel's mixer flags.
Namespace: Un4seen.Bass.AddOn.Mix
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.2
Syntax
[DllImportAttribute("bassmix")] 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_CHAN_BUFFER Buffer the sample data, for use by BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32). BASS_MIXER_CHAN_NORAMPIN Don'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_CHAN_PAUSE Don't process the source channel (paused mode). BASS_STREAM_AUTOFREE Automatically 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_xxx Speaker 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: BASSFlagIf successful, the channel's updated flags are returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | The channel is not plugged into a mixer. |
BASS_ERROR_SPEAKER | The mixer does not support the requested speaker(s), or the channel has matrix mixing enabled. |
Examples
// Disable ramping-in of a channel: BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_MIXER_CHAN_NORAMPIN, BASSFlag.BASS_MIXER_CHAN_NORAMPIN); // Enable ramping-in of a channel: BassMix.BASS_Mixer_ChannelFlags(channel, BASSFlag.BASS_DEFAULT, BASSFlag.BASS_MIXER_CHAN_NORAMPIN);
See Also