Fixed crashes/freezes on audio switch

This commit is contained in:
Vladyslav Stelmakhovskyi 2017-05-11 15:20:36 +02:00
parent 2328da3c48
commit e4d9772bbc

View file

@ -1508,11 +1508,13 @@ bool AudioClient::switchOutputToAudioDevice(const QAudioDeviceInfo& outputDevice
if (_audioOutput) {
_audioOutput->stop();
delete _audioOutput;
//must be deleted in next eventloop cycle when its called from notify()
_audioOutput->deleteLater();
_audioOutput = NULL;
_loopbackOutputDevice = NULL;
delete _loopbackAudioOutput;
//must be deleted in next eventloop cycle when its called from notify()
_loopbackAudioOutput->deleteLater();
_loopbackAudioOutput = NULL;
delete[] _outputMixBuffer;