Add interface for changing ggwave's internal logging (#52)

* ggwave : add interface for changing ggwave's internal logging

Using GGWave::setLogFile() it is now possible to change the log file
used internally by ggwave, or disable it all together.

* ggwave : add comments about thread-safety of setLogFile
This commit is contained in:
Georgi Gerganov
2021-09-21 06:48:16 +03:00
committed by GitHub
parent 1a0af88ed6
commit 9cf2d476b8
3 changed files with 62 additions and 20 deletions

View File

@@ -14,6 +14,9 @@
#define CHECK_F(cond) CHECK(!(cond))
int main() {
//ggwave_setLogFile(NULL); // disable logging
ggwave_setLogFile(stdout);
ggwave_Parameters parameters = ggwave_getDefaultParameters();
parameters.sampleFormatInp = GGWAVE_SAMPLE_FORMAT_I16;
parameters.sampleFormatOut = GGWAVE_SAMPLE_FORMAT_I16;