BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_ChannelStop Method BASS.NET API for the Un4seen BASS Audio Library
Stops a sample, stream, MOD music, or recording.

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

[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)]
public static bool BASS_ChannelStop(
	int handle
)

Parameters

handle
Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM or HRECORD handle.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Stopping a user stream (created with BASS_StreamCreate(Int32, Int32, BASSFlag, STREAMPROC, IntPtr)) will clear its buffer contents, and stopping a sample channel (HCHANNEL) will result in it being freed. Use BASS_ChannelPause(Int32) instead if you wish to stop a user stream and then resume it from the same point.

When used with a "decoding channel" (BASS_STREAM_DECODE or BASS_MUSIC_DECODE was used at creation), this function will end the channel at its current position, so that it's not possible to decode any more data from it. Any BASS_SYNC_END syncs that have been set on the channel will not be triggered by this, they are only triggered when reaching the natural end. BASS_ChannelSetPosition(Int32, Int64, BASSMode) can be used to reset the channel and start decoding again.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not a valid channel.

See Also

Reference