mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-23 05:56:17 +02:00
don't send audio to muted clients
This commit is contained in:
parent
69747ec316
commit
39c133e41a
4 changed files with 19 additions and 1 deletions
|
@ -58,6 +58,17 @@ void StreamServer::onChunkRead(const PcmStream* pcmStream, const msg::PcmChunk*
|
|||
std::lock_guard<std::recursive_mutex> mlock(sessionsMutex_);
|
||||
for (auto s : sessions_)
|
||||
{
|
||||
if (!settings_.sendAudioToMutedClients)
|
||||
{
|
||||
GroupPtr group = Config::instance().getGroupFromClient(s->clientId);
|
||||
if (group)
|
||||
{
|
||||
ClientInfoPtr client = group->getClient(s->clientId);
|
||||
if ((client && client->config.volume.muted) || group->muted)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!s->pcmStream() && isDefaultStream)//->getName() == "default")
|
||||
s->sendAsync(shared_message);
|
||||
else if (s->pcmStream().get() == pcmStream)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue