Mercurial > hg > svapp
changeset 488:6eb28350050d tony-2.0-integration
Merge from branch recording
author | Chris Cannam |
---|---|
date | Thu, 17 Sep 2015 12:08:29 +0100 |
parents | 21d3cf5c8f21 (current diff) 66b92c188cbd (diff) |
children | 7d9cef941d4d |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
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 {