diff framework/MainWindowBase.cpp @ 514:68ab0fe3bce4 3.0-integration

Merge from branch "tony-2.0-integration"
author Chris Cannam
date Thu, 04 Feb 2016 11:19:01 +0000
parents 14a81e881b1a 7cf6f5501212
children 51befd6165a3 a2a8fa0eed08
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Fri Jan 22 13:39:45 2016 +0000
+++ b/framework/MainWindowBase.cpp	Thu Feb 04 11:19:01 2016 +0000
@@ -2205,6 +2205,7 @@
     } else {
         m_playTarget = breakfastquay::AudioFactory::
             createCallbackPlayTarget(m_playSource);
+        m_playTarget->suspend(); // start in suspended state
         m_playSource->setSystemPlaybackTarget(m_playTarget);
     }
 
@@ -2663,6 +2664,7 @@
         if (action) action->setChecked(false);
     } else {
         if (m_audioIO) m_audioIO->resume();
+        else if (m_playTarget) m_playTarget->resume();
         playbackFrameChanged(m_viewManager->getPlaybackFrame());
 	m_playSource->play(m_viewManager->getPlaybackFrame());
     }
@@ -2704,6 +2706,7 @@
     }
 
     m_audioIO->resume();
+
     WritableWaveFileModel *model = m_recordTarget->startRecording();
     if (!model) {
         cerr << "ERROR: MainWindowBase::record: Recording failed" << endl;
@@ -3041,6 +3044,7 @@
     m_playSource->stop();
 
     if (m_audioIO) m_audioIO->suspend();
+    else if (m_playTarget) m_playTarget->suspend();
     
     if (m_paneStack && m_paneStack->getCurrentPane()) {
         updateVisibleRangeDisplay(m_paneStack->getCurrentPane());