From c39138a65dc02230ca3e8deb8cc49c0a887b1027 Mon Sep 17 00:00:00 2001 From: Nils Fenner Date: Sat, 21 Nov 2015 12:06:22 +0100 Subject: [PATCH] lock mutex also on start/stop audio loop playback --- src/audio/audio.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/audio/audio.cpp b/src/audio/audio.cpp index 62dfdb203..d063951c0 100644 --- a/src/audio/audio.cpp +++ b/src/audio/audio.cpp @@ -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); }