Browse Source

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.
pull/3188/head
sudden6 9 years ago
parent
commit
5339ad978b
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
  1. 7
      src/core/coreav.cpp

7
src/core/coreav.cpp

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

Loading…
Cancel
Save