# HG changeset patch # User Chris Cannam # Date 1442488109 -3600 # Node ID 6eb28350050dd441e22a7bc8628e04aabeaecd45 # Parent 21d3cf5c8f210818c5d60a077a8e6b7e97b2ef3d# Parent 66b92c188cbd561de38fdf9b043cca38dab45c82 Merge from branch recording diff -r 21d3cf5c8f21 -r 6eb28350050d framework/MainWindowBase.cpp --- 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(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 {