libfluidsynth  1.1.2
Typedefs | Enumerations
log.h File Reference

Logging interface. More...

Typedefs

typedef void(* fluid_log_function_t) (int level, char *message, void *data)
 Log function handler callback type used by fluid_set_log_function(). More...
 

Enumerations

enum  fluid_log_level {
  FLUID_PANIC, FLUID_ERR, FLUID_WARN, FLUID_INFO,
  FLUID_DBG
}
 FluidSynth log levels. More...
 

Detailed Description

Logging interface.

The default logging function of the fluidsynth prints its messages to the stderr. The synthesizer uses five level of messages: FLUID_PANIC, FLUID_ERR, FLUID_WARN, FLUID_INFO, and FLUID_DBG.

A client application can install a new log function to handle the messages differently. In the following example, the application sets a callback function to display FLUID_PANIC messages in a dialog, and ignores all other messages by setting the log function to NULL:

fluid_set_log_function(FLUID_PANIC, show_dialog, (void*) root_window);
fluid_set_log_function(FLUID_ERR, NULL, NULL);
fluid_set_log_function(FLUID_WARN, NULL, NULL);
fluid_set_log_function(FLUID_DBG, NULL, NULL);

Typedef Documentation

◆ fluid_log_function_t

typedef void(* fluid_log_function_t) (int level, char *message, void *data)

Log function handler callback type used by fluid_set_log_function().

Parameters
levelLog level (fluid_log_level)
messageLog message text
dataUser data pointer supplied to fluid_set_log_function().

Enumeration Type Documentation

◆ fluid_log_level

FluidSynth log levels.

Enumerator
FLUID_PANIC 

The synth can't function correctly any more.

FLUID_ERR 

Serious error occurred.

FLUID_WARN 

Warning.

FLUID_INFO 

Verbose informational messages.

FLUID_DBG 

Debugging messages.