From 33a0f68cf1a4afb153fbca3b3e93aa2e8503f510 Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Tue, 11 Jul 2023 22:00:24 -0400 Subject: [PATCH] Mic check --- src/virtmic.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/virtmic.cpp b/src/virtmic.cpp index 3a691d2..8e17d8e 100644 --- a/src/virtmic.cpp +++ b/src/virtmic.cpp @@ -6,7 +6,7 @@ namespace Virtmic { -const QStringList EXCLUDE_TARGETS{"Chromium input", "discord-awesomeaudio"}; +const QStringList EXCLUDE_TARGETS{"Chromium input", "discord-awesomeaudio", "pavucontrol"}; const std::string nullstr = ""; const std::string &getTarget(const pipewire::spa::dict &props) { @@ -86,6 +86,12 @@ void start(QString _target) { auto &parent = nodes.at(parent_id); std::string name = getTarget(parent.props); + if (EXCLUDE_TARGETS.contains(QString::fromStdString(name))) + continue; + + if (parent.props.count("media.class") && (parent.props.at("media.class") == "Audio/Source" || parent.props.at("media.class") == "Audio/Source/Virtual")) + continue; + if (name == target || (target == "[All Desktop Audio]" && !EXCLUDE_TARGETS.contains(QString::fromStdString(name)))) {