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

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.
This commit is contained in:
sudden6 2016-04-24 00:02:33 +02:00
parent afcd146a5b
commit 5339ad978b
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -386,9 +386,8 @@ void CoreAV::groupCallCallback(void* tox, int group, int peer,
Core* c = static_cast<Core*>(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();