ENCODENOTIFYPROC callback

User defined callback function to receive notifications on an encoder's status.

void CALLBACK EncodeNotifyProc(
    HENCODE handle,
    DWORD status,
    void *user
);

Parameters

handleThe encoder that the notification is from.
statusThe encoder's status, one of the following.
BASS_ENCODE_NOTIFY_CASTCast server connection died.
BASS_ENCODE_NOTIFY_CAST_TIMEOUTCast data sending timeout. The connection is not dead at this point; it may just be a temporary problem.
BASS_ENCODE_NOTIFY_ENCODERThe encoder died.
BASS_ENCODE_NOTIFY_FREEThe encoder has been freed.
BASS_ENCODE_NOTIFY_LIMITThe encoder has reached its data limit, eg. as set with BASS_Encode_StartLimit.
BASS_ENCODE_NOTIFY_QUEUE_FULLThe queue length has reached its limit (or out of memory) and data has been dropped. The total amount of dropped data is available from BASS_Encode_GetCount.
BASS_ENCODE_NOTIFY_SERVERThe server died. This can be due to OGG data missing headers, perhaps because the encoder has processed data before the server was started.
BASS_ENCODE_NOTIFY_TERMINATEThe encoder was forcefully terminated because it took too long to finish, according to the BASS_CONFIG_ENCODE_TERMINATE setting.
userThe user instance data given when BASS_Encode_SetNotify was called.

Remarks

All status values below 0x10000 mean the encoder has stopped accepting data; subsequent BASS_Encode_IsActive calls on it will return BASS_ACTIVE_STOPPED.

It is safe to call BASS_Encode_Stop to free an encoder from within a notification callback.

See also

BASS_Encode_SetNotify