Stops a sample, stream, MOD music, or recording.

BOOL BASS_ChannelStop(
    DWORD handle


handleThe channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD.

Return value

If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not a valid channel.


Stopping a user stream (created with BASS_StreamCreate) will clear its buffer contents, and stopping a sample channel (HCHANNEL) or recording (HRECORD) will result in it being freed. Use BASS_ChannelPause instead if you wish to be able to resume them (with BASS_ChannelStart).

When used with a decoding channel, this function will end the channel at its current position, so that it is 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 can be used to reset the channel and start decoding again.

See also

BASS_ChannelIsActive, BASS_ChannelPause, BASS_ChannelStart, BASS_RecordStart, BASS_SampleStop