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:
parent
872be36225
commit
d631ddbc86
|
@ -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.");
|
||||
|
|
Loading…
Reference in New Issue
Block a user