From 5339ad978bd2f962e0799e48452ac2549edf8bc7 Mon Sep 17 00:00:00 2001 From: sudden6 Date: Sun, 24 Apr 2016 00:02:33 +0200 Subject: [PATCH] fix(groupaudio): don't play audio while call is inactive This also avoids logspam, because toxcore keeps recieving audio data even if the call is inactive. --- src/core/coreav.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/coreav.cpp b/src/core/coreav.cpp index c865c7d67..47a28a7cd 100644 --- a/src/core/coreav.cpp +++ b/src/core/coreav.cpp @@ -386,9 +386,8 @@ void CoreAV::groupCallCallback(void* tox, int group, int peer, Core* c = static_cast(core); CoreAV* cav = c->getAv(); - if (!cav->groupCalls.contains(group)) { - qWarning() << "Audio for invalid group id" << group - << "will not be played back."; + if (!cav->groupCalls.contains(group)) + { return; } @@ -396,7 +395,7 @@ void CoreAV::groupCallCallback(void* tox, int group, int peer, emit c->groupPeerAudioPlaying(group, peer); - if (call.muteVol) + if (call.muteVol || call.inactive) return; Audio& audio = Audio::getInstance();