1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

cleanup close audio out device

This commit is contained in:
Nils Fenner 2015-11-08 22:23:01 +01:00
parent 872be36225
commit d631ddbc86
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C

View File

@ -504,14 +504,13 @@ void Audio::cleanupOutput()
alSourceStop(alMainSource);
alDeleteSources(1, &alMainSource);
ALCdevice* device = alcGetContextsDevice(alContext);
if (!alcMakeContextCurrent(nullptr))
qWarning("Failed to clear current audio context.");
alcDestroyContext(alContext);
alContext = nullptr;
if (alcCloseDevice(device))
if (alcCloseDevice(alOutDev))
alOutDev = nullptr;
else
qWarning("Failed to close output.");