Mercurial > hg > svapp
comparison 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 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 583:48cfa4e2bfc1 | 584:0bb2ec333d3b | 
|---|---|
| 2314 | 2314 | 
| 2315 m_recentFiles.addFile(source.getLocation()); | 2315 m_recentFiles.addFile(source.getLocation()); | 
| 2316 return FileOpenSucceeded; | 2316 return FileOpenSucceeded; | 
| 2317 } | 2317 } | 
| 2318 | 2318 | 
| 2319 class AudioLogCallback : public breakfastquay::AudioFactory::LogCallback | |
| 2320 { | |
| 2321 public: | |
| 2322 void log(std::string message) const override { | |
| 2323 SVDEBUG << message << endl; | |
| 2324 } | |
| 2325 }; | |
| 2326 | |
| 2319 void | 2327 void | 
| 2320 MainWindowBase::createAudioIO() | 2328 MainWindowBase::createAudioIO() | 
| 2321 { | 2329 { | 
| 2322 if (m_playTarget || m_audioIO) return; | 2330 if (m_playTarget || m_audioIO) return; | 
| 2323 | 2331 | 
| 2332 static AudioLogCallback audioLogCallback; | |
| 2333 breakfastquay::AudioFactory::setLogCallback(&audioLogCallback); | |
| 2334 | |
| 2324 if (!(m_soundOptions & WithAudioOutput)) return; | 2335 if (!(m_soundOptions & WithAudioOutput)) return; | 
| 2325 | 2336 | 
| 2326 QSettings settings; | 2337 QSettings settings; | 
| 2327 settings.beginGroup("Preferences"); | 2338 settings.beginGroup("Preferences"); | 
| 2328 QString implementation = settings.value | 2339 QString implementation = settings.value | 
