mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +02:00
Fixed crashes/freezes on audio switch
This commit is contained in:
parent
2328da3c48
commit
e4d9772bbc
1 changed files with 4 additions and 2 deletions
|
@ -1508,11 +1508,13 @@ bool AudioClient::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDevice
|
||||||
if (_audioOutput) {
|
if (_audioOutput) {
|
||||||
_audioOutput->stop();
|
_audioOutput->stop();
|
||||||
|
|
||||||
delete _audioOutput;
|
//must be deleted in next eventloop cycle when its called from notify()
|
||||||
|
_audioOutput->deleteLater();
|
||||||
_audioOutput = NULL;
|
_audioOutput = NULL;
|
||||||
|
|
||||||
_loopbackOutputDevice = NULL;
|
_loopbackOutputDevice = NULL;
|
||||||
delete _loopbackAudioOutput;
|
//must be deleted in next eventloop cycle when its called from notify()
|
||||||
|
_loopbackAudioOutput->deleteLater();
|
||||||
_loopbackAudioOutput = NULL;
|
_loopbackAudioOutput = NULL;
|
||||||
|
|
||||||
delete[] _outputMixBuffer;
|
delete[] _outputMixBuffer;
|
||||||
|
|
Loading…
Reference in a new issue