BASS_Encode_StopEx


Frees an encoder or all encoders on a channel, optionally delaying it until the queue has been processed.

BOOL BASS_Encode_StopEx(
    DWORD handle,
    BOOL queue
);

Parameters

handleThe encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD.
queueProcess the queue first? If so, the encoder will not be freed until after any data remaining in the queue has been processed, and it will not accept any new data in the meantime.

Return value

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

Remarks

When an encoder is told to wait for its queue to be processed, this function will return immediately and the encoder will be freed in the background after the queued data has been processed. BASS_Encode_SetNotify can be used to get notification of when the encoder has been freed. BASS_Encode_Stop (or this function with queue = FALSE) can be used to cancel to queue processing and free the encoder immediately.

Error codes

BASS_ERROR_HANDLEhandle is not valid.

See also

BASS_Encode_Start, BASS_Encode_Stop