14 const char *func_name,
17 fprintf(stderr,
"miniDSP: error %d in %s(): %s\n",
18 (
int)code, func_name, message);
29 current_handler = handler ? handler : default_error_handler;
39 current_handler(code, func_name, message);
A mini library of DSP (Digital Signal Processing) routines.
MD_ErrorCode
Error codes reported by miniDSP when a precondition is violated.
void(* MD_ErrorHandler)(MD_ErrorCode code, const char *func_name, const char *message)
Signature for a user-installed error handler.
void md_report_error(MD_ErrorCode code, const char *func_name, const char *message)
Report a precondition violation to the active error handler.
void MD_set_error_handler(MD_ErrorHandler handler)
Install a custom error handler.