Assembly: Bass.Net (in Bass.Net.dll) Version: 126.96.36.199
[DllImportAttribute("bassmix")] public static bool BASS_Mixer_StreamAddChannelEx( int handle, int channel, BASSFlag flags, long start, long length )
<DllImportAttribute("bassmix">] Public Shared Function BASS_Mixer_StreamAddChannelEx ( handle As Integer, channel As Integer, flags As BASSFlag, start As Long, length As Long ) As Boolean
- Type: SystemInt32
The mixer handle.
- Type: SystemInt32
The handle of the channel to plug into the mixer... a HMUSIC, HSTREAM or HRECORD.
- Type: Un4seen.BassBASSFlag
Any combination of these flags (see BASSFlag):
BASS_MIXER_MATRIX Creates a channel matrix, allowing the source channels to be sent to any of the mixer output channels, at any levels. The matrix can be retrieved and modified via the BASS_Mixer_ChannelGetMatrix(Int32, Single) and BASS_Mixer_ChannelSetMatrix(Int32, Single) functions. The matrix will initially contain a one-to-one mapping, eg. left out = left in, right out = right in, etc... BASS_MIXER_DOWNMIX Downmix to stereo, or mono if the mixer output is mono. BASS_MIXER_BUFFER Buffer the sample data, for use by BASS_Mixer_ChannelGetData(Int32, IntPtr, Int32) and BASS_Mixer_ChannelGetLevel(Int32). This increases memory requirements, so should not be enabled needlessly. The size of the buffer can be controlled via the BASS_CONFIG_MIXER_BUFFER config option. BASS_MIXER_LIMIT Limit the mixer processing to the amount of data available from this source, while the source is active (not ended). If the source stalls, then the mixer will too, rather than continuing to mix other sources, as it would normally do. 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_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_PAUSE Don't process the source channel (add it in a paused mode). Use BASS_Mixer_ChannelFlags(Int32, BASSFlag, BASSFlag) in order to toggle processing of the source channel. 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.
If matrix mixing is enabled then the matrix will be initialized to place the source on the requested speaker(s), with downmixing also applied if the BASS_MIXER_DOWNMIX flag is specified. TheBASS_DEVICE_NOSPEAKER flag has effect here.
- Type: SystemInt64
Delay (in bytes) before the channel is mixed in.
- Type: SystemInt64
The maximum amount of data (in bytes) to mix... 0 = no limit. Once this end point is reached, the channel will be removed from the mixer.
Return ValueType: Boolean
If successful, then is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
The start and length parameters relate to the mixer output. So when calculating these values, use the mixer stream's sample format rather than the source channel's. The start parameter is automatically rounded-down to the nearest sample boundary, while the length parameter is rounded-up to the nearest sample boundary.
|BASS_ERROR_HANDLE||At least one of handle and channel is not valid.|
|BASS_ERROR_DECODE||channel is not a decoding channel.|
|BASS_ERROR_ALREADY||channel is already plugged into a mixer. It must be unplugged first.|
|BASS_ERROR_SPEAKER||The mixer does not support the requested speaker(s), or you're attempting to assign a stereo stream to a mono speaker.|
Dim start As Long = Bass.BASS_ChannelSeconds2Bytes(mixer, 1.0) ' delay Dim length As Long = Bass.BASS_ChannelSeconds2Bytes(mixer, 2.0) ' duration ' add the channel BassMix.BASS_Mixer_StreamAddChannelEx(mixer, channel, 0, start, length)
long start = Bass.BASS_ChannelSeconds2Bytes(mixer, 1.0); // delay long length = Bass.BASS_ChannelSeconds2Bytes(mixer, 2.0); // duration // add the channel BassMix.BASS_Mixer_StreamAddChannelEx(mixer, channel, 0, start, length);