Mercurial > hg > svapp
changeset 492:7c779438edc3 tony-2.0-integration
Suspend audio driver when stopping recording from record button
author | Chris Cannam |
---|---|
date | Mon, 12 Oct 2015 15:06:02 +0100 |
parents | 2f5ffd36879b |
children | 4f1d280903ad |
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; }