Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 540:0d5c3abc9658 3.0-integration
Delete audio I/O objects in a fixed order
author | Chris Cannam |
---|---|
date | Wed, 30 Nov 2016 11:44:40 +0000 |
parents | 287fce13a1ae |
children | baa11365ebdd |
comparison
equal
deleted
inserted
replaced
539:630c4a9885ca | 540:0d5c3abc9658 |
---|---|
285 } | 285 } |
286 | 286 |
287 MainWindowBase::~MainWindowBase() | 287 MainWindowBase::~MainWindowBase() |
288 { | 288 { |
289 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl; | 289 SVDEBUG << "MainWindowBase::~MainWindowBase" << endl; |
290 | |
291 // We have to delete the breakfastquay::SystemPlaybackTarget or | |
292 // breakfastquay::SystemAudioIO object (whichever we have -- it | |
293 // depends on whether we handle recording or not) before we delete | |
294 // the ApplicationPlaybackSource and ApplicationRecordTarget that | |
295 // they refer to. | |
296 | |
297 // First prevent this trying to call target. | |
298 if (m_playSource) m_playSource->setSystemPlaybackTarget(0); | |
299 | |
300 // Then delete the breakfastquay::System object. | |
301 // Only one of these two exists! | |
302 delete m_audioIO; | |
290 delete m_playTarget; | 303 delete m_playTarget; |
304 | |
305 // Then delete the Application objects. | |
291 delete m_playSource; | 306 delete m_playSource; |
292 delete m_audioIO; | |
293 delete m_recordTarget; | 307 delete m_recordTarget; |
308 | |
294 delete m_viewManager; | 309 delete m_viewManager; |
295 delete m_oscQueue; | 310 delete m_oscQueue; |
296 delete m_oscQueueStarter; | 311 delete m_oscQueueStarter; |
297 delete m_midiInput; | 312 delete m_midiInput; |
298 Profiles::getInstance()->dump(); | 313 Profiles::getInstance()->dump(); |