Mercurial > hg > svapp
comparison framework/MainWindowBase.cpp @ 502:bfe468c89d30 tony-2.0-integration
Merge from branch "3.0-integration"
author | Chris Cannam |
---|---|
date | Wed, 14 Oct 2015 10:19:24 +0100 |
parents | c82cae9a9e74 |
children | 0fe07a89fbbb |
comparison
equal
deleted
inserted
replaced
497:d1c70c680fa9 | 502:bfe468c89d30 |
---|---|
2198 if (m_soundOptions & WithAudioInput) { | 2198 if (m_soundOptions & WithAudioInput) { |
2199 m_audioIO = breakfastquay::AudioFactory:: | 2199 m_audioIO = breakfastquay::AudioFactory:: |
2200 createCallbackIO(m_recordTarget, m_playSource); | 2200 createCallbackIO(m_recordTarget, m_playSource); |
2201 m_audioIO->suspend(); // start in suspended state | 2201 m_audioIO->suspend(); // start in suspended state |
2202 m_playSource->setSystemPlaybackTarget(m_audioIO); | 2202 m_playSource->setSystemPlaybackTarget(m_audioIO); |
2203 m_recordTarget->setSystemRecordSource(m_audioIO); | |
2203 } else { | 2204 } else { |
2204 m_playTarget = breakfastquay::AudioFactory:: | 2205 m_playTarget = breakfastquay::AudioFactory:: |
2205 createCallbackPlayTarget(m_playSource); | 2206 createCallbackPlayTarget(m_playSource); |
2206 m_playSource->setSystemPlaybackTarget(m_playTarget); | 2207 m_playSource->setSystemPlaybackTarget(m_playTarget); |
2207 } | 2208 } |
2699 if (action) action->setChecked(false); | 2700 if (action) action->setChecked(false); |
2700 return; | 2701 return; |
2701 } | 2702 } |
2702 } | 2703 } |
2703 | 2704 |
2705 QAction *action = qobject_cast<QAction *>(sender()); | |
2706 | |
2707 if (m_audioRecordMode == RecordReplaceSession) { | |
2708 if (!checkSaveModified()) { | |
2709 if (action) action->setChecked(false); | |
2710 return; | |
2711 } | |
2712 } | |
2713 | |
2704 m_audioIO->resume(); | 2714 m_audioIO->resume(); |
2705 | |
2706 WritableWaveFileModel *model = m_recordTarget->startRecording(); | 2715 WritableWaveFileModel *model = m_recordTarget->startRecording(); |
2707 if (!model) { | 2716 if (!model) { |
2708 cerr << "ERROR: MainWindowBase::record: Recording failed" << endl; | 2717 cerr << "ERROR: MainWindowBase::record: Recording failed" << endl; |
2709 //!!! report | 2718 //!!! report |
2710 if (action) action->setChecked(false); | 2719 if (action) action->setChecked(false); |