mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-02-18 18:11:05 +00:00
Make printing debug messages runtime configurable (#619)
Supplying --verbose to the fluidsynth executable now prints debug messages to stdout. Debug messages are still being printed by default when fluidsynth was compiled in debug mode.
This commit is contained in:
parent
2bbe9272bb
commit
aa3f5a52fd
2 changed files with 5 additions and 2 deletions
|
@ -706,6 +706,7 @@ int main(int argc, char **argv)
|
|||
|
||||
case 'v':
|
||||
fluid_settings_setint(settings, "synth.verbose", TRUE);
|
||||
fluid_set_log_function(FLUID_DBG, fluid_default_log_function, NULL);
|
||||
break;
|
||||
|
||||
case 'z':
|
||||
|
|
|
@ -85,7 +85,11 @@ static fluid_log_function_t fluid_log_function[LAST_LOG_LEVEL] =
|
|||
fluid_default_log_function,
|
||||
fluid_default_log_function,
|
||||
fluid_default_log_function,
|
||||
#ifdef DEBUG
|
||||
fluid_default_log_function
|
||||
#else
|
||||
NULL
|
||||
#endif
|
||||
};
|
||||
static void *fluid_log_user_data[LAST_LOG_LEVEL] = { NULL };
|
||||
|
||||
|
@ -149,9 +153,7 @@ fluid_default_log_function(int level, const char *message, void *data)
|
|||
break;
|
||||
|
||||
case FLUID_DBG:
|
||||
#if DEBUG
|
||||
FLUID_FPRINTF(out, "%s: debug: %s\n", fluid_libname, message);
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue