Sets a callback function on an encoder (or all encoders on a channel) to receive notifications about its status.
BOOL BASS_Encode_SetNotify(
DWORD handle,
ENCODENOTIFYPROC *proc,
void *user
);
| handle | The encoder or channel handle... a HENCODE, HSTREAM, HMUSIC, or HRECORD. |
| proc | Callback function to receive the notifications... NULL = no callback. |
| user | User instance data to pass to the callback function. |
| BASS_ERROR_HANDLE | handle is not valid. |
An encoder can only have one notification callback set. Subsequent calls of this function can be used to change the callback function, or disable notifications (proc = NULL).
The status of an encoder and its cast connection (if it has one) is checked when data is sent to the encoder or server, and by BASS_Encode_IsActive. That means an encoder's death will not be detected automatically, and so no notification given, while no data is being encoded.
If the encoder is already dead when setting up a notification callback then the callback will be triggered immediately.