Avoid to close invalid audio input
This commit is contained in:
parent
863fdacffb
commit
4ce436b2f1
@ -136,12 +136,16 @@ void AudioInput::onStopRecording()
|
||||
readPromise_.reset();
|
||||
}
|
||||
|
||||
if(ioDevice_ != nullptr)
|
||||
{
|
||||
ioDevice_->reset();
|
||||
ioDevice_->disconnect();
|
||||
audioInput_->stop();
|
||||
ioDevice_ = nullptr;
|
||||
}
|
||||
|
||||
audioInput_->stop();
|
||||
}
|
||||
|
||||
void AudioInput::onReadyRead()
|
||||
{
|
||||
if(readPromise_ == nullptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user