Mercurial > hg > svapp
diff framework/MainWindowBase.cpp @ 488:6eb28350050d tony-2.0-integration
Merge from branch recording
author | Chris Cannam |
---|---|
date | Thu, 17 Sep 2015 12:08:29 +0100 |
parents | 21d3cf5c8f21 66b92c188cbd |
children | 7d9cef941d4d |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Wed Sep 16 12:04:26 2015 +0100 +++ b/framework/MainWindowBase.cpp Thu Sep 17 12:08:29 2015 +0100 @@ -2198,6 +2198,7 @@ if (m_soundOptions & WithAudioInput) { m_audioIO = breakfastquay::AudioFactory:: createCallbackIO(m_recordTarget, m_playSource); + m_audioIO->suspend(); // start in suspended state m_playSource->setSystemPlaybackTarget(m_audioIO); } else { m_playTarget = breakfastquay::AudioFactory:: @@ -2659,6 +2660,7 @@ QAction *action = qobject_cast<QAction *>(sender()); if (action) action->setChecked(false); } else { + if (m_audioIO) m_audioIO->resume(); playbackFrameChanged(m_viewManager->getPlaybackFrame()); m_playSource->play(m_viewManager->getPlaybackFrame()); } @@ -2689,7 +2691,9 @@ if (m_audioRecordMode == RecordReplaceSession) { if (!checkSaveModified()) return; } - + + if (m_audioIO) m_audioIO->resume(); + WritableWaveFileModel *model = m_recordTarget->startRecording(); if (!model) { cerr << "ERROR: MainWindowBase::record: Recording failed" << endl; @@ -2703,7 +2707,7 @@ //!!! ??? return; } - + PlayParameterRepository::getInstance()->addPlayable(model); if (m_audioRecordMode == RecordReplaceSession || !getMainModel()) { @@ -3021,6 +3025,8 @@ m_playSource->stop(); + if (m_audioIO) m_audioIO->suspend(); + if (m_paneStack && m_paneStack->getCurrentPane()) { updateVisibleRangeDisplay(m_paneStack->getCurrentPane()); } else {