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

Merge pull request #3833

Alice Weigt (1):
      fix(audio): Clear audio buffer when ending audio loop
This commit is contained in:
sudden6 2016-10-27 19:54:28 +02:00
commit 6ed8235298
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -721,4 +721,13 @@ void Audio::stopLoop()
QMutexLocker locker(&audioLock);
alSourcei(alMainSource, AL_LOOPING, AL_FALSE);
alSourceStop(alMainSource);
ALint state;
alGetSourcei(alMainSource, AL_SOURCE_STATE, &state);
if (state == AL_STOPPED)
{
alSourcei(alMainSource, AL_BUFFER, AL_NONE);
alDeleteBuffers(1, &alMainBuffer);
alMainBuffer = 0;
}
}