Mic check
This commit is contained in:
parent
17517d1b46
commit
33a0f68cf1
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
namespace Virtmic {
|
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 nullstr = "";
|
||||||
const std::string &getTarget(const pipewire::spa::dict &props) {
|
const std::string &getTarget(const pipewire::spa::dict &props) {
|
||||||
|
@ -86,6 +86,12 @@ void start(QString _target) {
|
||||||
|
|
||||||
auto &parent = nodes.at(parent_id);
|
auto &parent = nodes.at(parent_id);
|
||||||
std::string name = getTarget(parent.props);
|
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 ||
|
if (name == target ||
|
||||||
(target == "[All Desktop Audio]" &&
|
(target == "[All Desktop Audio]" &&
|
||||||
!EXCLUDE_TARGETS.contains(QString::fromStdString(name)))) {
|
!EXCLUDE_TARGETS.contains(QString::fromStdString(name)))) {
|
||||||
|
|
Loading…
Reference in New Issue