Mercurial > hg > svapp
changeset 495:40e7b4e1b569 3.0-integration
Suspend audio driver when stopping recording from record button
author | Chris Cannam |
---|---|
date | Mon, 12 Oct 2015 15:06:02 +0100 |
parents | 0ce24bb965a8 |
children | dcd2afbc1bb7 |
files | framework/MainWindowBase.cpp |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp Mon Oct 12 13:51:59 2015 +0100 +++ b/framework/MainWindowBase.cpp Mon Oct 12 15:06:02 2015 +0100 @@ -2681,10 +2681,14 @@ if (!m_audioIO) { createAudioIO(); } + + if (!m_audioIO) { + //!!! report + return; + } if (m_recordTarget->isRecording()) { - m_recordTarget->stopRecording(); - emit audioFileLoaded(); + stop(); return; } @@ -2697,7 +2701,7 @@ } } - if (m_audioIO) m_audioIO->resume(); + m_audioIO->resume(); WritableWaveFileModel *model = m_recordTarget->startRecording(); if (!model) { @@ -2709,6 +2713,7 @@ if (!model->isOK()) { m_recordTarget->stopRecording(); + m_audioIO->suspend(); delete model; return; } @@ -2726,6 +2731,7 @@ FileOpenStatus tplStatus = openSessionTemplate(templateName); if (tplStatus == FileOpenCancelled) { m_recordTarget->stopRecording(); + m_audioIO->suspend(); PlayParameterRepository::getInstance()->removePlayable(model); return; }