mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
fix(audio): close the audio device after playing a sound
This bug was uncovered by 65896e45017f8f748bc5b9db10a4400d7fd418dc because this sound now happens after the call is closed, but doesn't close the audio device.
This commit is contained in:
parent
e55f86c6a5
commit
a3370173df
@ -521,6 +521,10 @@ void OpenAL::playMono16SoundCleanup()
|
||||
alSourcei(alMainSource, AL_BUFFER, AL_NONE);
|
||||
alDeleteBuffers(1, &alMainBuffer);
|
||||
alMainBuffer = 0;
|
||||
// close the audio device if no other sources active
|
||||
if (peerSources.isEmpty()) {
|
||||
cleanupOutput();
|
||||
}
|
||||
} else {
|
||||
// the audio didn't finish, try again later
|
||||
playMono16Timer.start(10);
|
||||
|
Loading…
x
Reference in New Issue
Block a user