Skip to content
Snippets Groups Projects
Commit 430ca9ea authored by Albert Gräf's avatar Albert Gräf
Browse files

fluid~: Get rid of unimportant log messages, only post errors from fluidsynth to the console.

parent d4759728
No related branches found
No related tags found
1 merge request!834Various fluid~ initialization fixes
...@@ -368,7 +368,12 @@ static void *fluid_tilde_new(t_symbol *s, int argc, t_atom *argv) ...@@ -368,7 +368,12 @@ static void *fluid_tilde_new(t_symbol *s, int argc, t_atom *argv)
fluid_init(x, gensym("init"), argc, argv); fluid_init(x, gensym("init"), argc, argv);
return (void *)x; return (void *)x;
} }
static void fluid_log_cb(int level, const char *message, void *data)
{
post("fluid~ [%d]: %s", level, message);
}
void fluid_tilde_setup(void) void fluid_tilde_setup(void)
{ {
fluid_tilde_class = class_new(gensym("fluid~"), fluid_tilde_class = class_new(gensym("fluid~"),
...@@ -441,4 +446,12 @@ void fluid_tilde_setup(void) ...@@ -441,4 +446,12 @@ void fluid_tilde_setup(void)
class_addmethod(fluid_tilde_class, class_addmethod(fluid_tilde_class,
(t_method)fluid_tilde_dsp, gensym("dsp"), A_CANT, 0); (t_method)fluid_tilde_dsp, gensym("dsp"), A_CANT, 0);
// Set up logging. We don't want to have too much noise here, and we also
// want to see the important stuff in the Pd console rather than the
// terminal.
fluid_set_log_function(FLUID_PANIC, fluid_log_cb, NULL);
fluid_set_log_function(FLUID_ERR, fluid_log_cb, NULL);
fluid_set_log_function(FLUID_WARN, NULL, NULL);
fluid_set_log_function(FLUID_DBG, NULL, NULL);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment