sfztools/sfizz

Add option to suppress stdout log messages in API

vimpostor opened this issue · 4 comments

Right now, if I use sfizz's C++ API and load a sfz file with loadSfzFile(), then sfizz may print out lot of stuff on stdout, e.g.:

Changing default sample path to masonhamlin-a samples/                                                                                                                                                                                       
Updating masonhamlin-a samples/MH AT2035 f A#3.wav to "MasonHamlin-A Samples/MH AT2035 f A#3.wav"
...

It would be great if there was an option to turn off this logging, as I am writing a CLI application and this verbose output is really distracting (sfizz shouldn't print something to stdout).

This option should take precendence over the compile time options defined in

#if !defined(NDEBUG) || defined(SFIZZ_ENABLE_RELEASE_DBG)

Thanks for the report, I'll look into it!

Last I checked it wasn't real-time safe (that said, writing to stdout isn't either). I had in mind at some point to find some way to log important things in RT.

I found gabime/spdlog#1873, but I'm not sure if it's relevant for our use case