mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 09:15:34 +08:00
Ref T737, stop output device
This commit is contained in:
committed by
Mat Sutcliffe
parent
7d04ca6435
commit
905c487451
@@ -111,11 +111,11 @@ namespace BlackCore
|
||||
CLogMessage(this).warning(w);
|
||||
}
|
||||
|
||||
m_audioOutputCom1.reset(new QAudioOutput(outputDevice, outputFormat));
|
||||
m_audioOutputCom.reset(new QAudioOutput(outputDevice, outputFormat));
|
||||
// m_audioOutput->setBufferSize(bufferSize);
|
||||
m_audioOutputBuffer->open(QIODevice::ReadWrite | QIODevice::Unbuffered);
|
||||
m_audioOutputBuffer->setAudioFormat(outputFormat);
|
||||
m_audioOutputCom1->start(m_audioOutputBuffer);
|
||||
m_audioOutputCom->start(m_audioOutputBuffer);
|
||||
|
||||
m_started = true;
|
||||
}
|
||||
@@ -124,6 +124,7 @@ namespace BlackCore
|
||||
{
|
||||
if (!m_started) { return; }
|
||||
m_started = false;
|
||||
m_audioOutputCom->stop();
|
||||
m_audioOutputBuffer->deleteLater();
|
||||
m_audioOutputBuffer = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user