[beast: 67/73] BSE: SF2: disable unimportant fluid messages



commit 063a1d05d18c1449ddb9cca0cb3aaff331f29bb7
Author: Stefan Westerfeld <stefan space twc de>
Date:   Fri Mar 10 21:46:29 2017 +0100

    BSE: SF2: disable unimportant fluid messages
    
    Signed-off-by: Stefan Westerfeld <stefan space twc de>

 bse/bsesoundfontrepo.cc |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/bse/bsesoundfontrepo.cc b/bse/bsesoundfontrepo.cc
index b2367b8..bf97d9a 100644
--- a/bse/bsesoundfontrepo.cc
+++ b/bse/bsesoundfontrepo.cc
@@ -341,6 +341,18 @@ SoundFontRepoImpl::SoundFontRepoImpl (BseObject *bobj) :
   fluid_settings = new_fluid_settings();
   fluid_synth = new_fluid_synth (fluid_settings);
 
+  static bool log_init_done = false;
+  if (!log_init_done)
+    {
+      // disable unimportant fluid messages: only display FLUID_ERR and FLUID_PANIC
+
+      fluid_set_log_function (FLUID_DBG, nullptr, nullptr);
+      fluid_set_log_function (FLUID_INFO, nullptr, nullptr);
+      fluid_set_log_function (FLUID_WARN, nullptr, nullptr);
+
+      log_init_done = true;
+    }
+
   fluid_mix_freq = 0;
   fluid_events = nullptr;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]