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

lock mutex also on start/stop audio loop playback

This commit is contained in:
Nils Fenner 2015-11-21 12:06:22 +01:00
parent 08c43d0b83
commit c39138a65d
No known key found for this signature in database
GPG Key ID: 9591A163FF9BE04C

View File

@ -781,11 +781,13 @@ void Audio::deleteSource(quint32 sid)
void Audio::startLoop()
{
QMutexLocker locker(&d->audioLock);
alSourcei(d->alMainSource, AL_LOOPING, AL_TRUE);
}
void Audio::stopLoop()
{
QMutexLocker locker(&d->audioLock);
alSourcei(d->alMainSource, AL_LOOPING, AL_FALSE);
alSourceStop(d->alMainSource);
}