Locks a stream, MOD music or recording channel to the current thread.
BOOL BASS_ChannelLock( DWORD handle, BOOL lock );
handle | The channel handle... a HMUSIC, HSTREAM or HRECORD. |
lock | Lock or unlock the channel... TRUE = lock, FALSE = unlock. |
BASS_ERROR_HANDLE | handle is not a valid channel. |
BASS_ERROR_ALREADY | The channel is already unlocked. |
BASS_ERROR_FREEING | The channel cannot be locked because it is being freed. |
Recursive locking is supported. Each lock must be matched by an unlock in the same thread.
if (BASS_ChannelLock(channel, true)) { // lock channel BASS_ChannelSetDSP(channel, DspProc1, NULL, 0); // set 1st DSP BASS_ChannelSetDSP(channel, DspProc2, NULL, 0); // set 2nd DSP BASS_ChannelLock(channel, false); // unlock channel }