diff framework/MainWindowBase.cpp @ 584:0bb2ec333d3b

Logging from audio I/O
author Chris Cannam
date Tue, 21 Feb 2017 15:33:03 +0000
parents 48cfa4e2bfc1
children 5f488e1868cc
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Wed Jan 18 14:22:25 2017 +0000
+++ b/framework/MainWindowBase.cpp	Tue Feb 21 15:33:03 2017 +0000
@@ -2316,11 +2316,22 @@
     return FileOpenSucceeded;
 }
 
+class AudioLogCallback : public breakfastquay::AudioFactory::LogCallback
+{
+public:
+    void log(std::string message) const override {
+        SVDEBUG << message << endl;
+    }
+};
+
 void
 MainWindowBase::createAudioIO()
 {
     if (m_playTarget || m_audioIO) return;
 
+    static AudioLogCallback audioLogCallback;
+    breakfastquay::AudioFactory::setLogCallback(&audioLogCallback);
+    
     if (!(m_soundOptions & WithAudioOutput)) return;
 
     QSettings settings;