diff options
author | Eir W <[email protected]> | 2022-08-02 21:26:29 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-02 18:26:29 -0700 |
commit | 5bea47915ae0fcdb0fb88d1e5b89834202c8926a (patch) | |
tree | e8f0d37494dc5bc549e1af5fc33d9ff06a4e0625 | |
parent | b26ca6b65e703fdc852e451945582f0ed6cc9c35 (diff) |
Add media class for Audio/Source/Virtual as a valid node (#747)
-rw-r--r-- | alc/backends/pipewire.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index 0048e1e2..acb4616f 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -789,6 +789,7 @@ constexpr char MonitorPrefix[]{"Monitor of "}; constexpr auto MonitorPrefixLen = al::size(MonitorPrefix) - 1; constexpr char AudioSinkClass[]{"Audio/Sink"}; constexpr char AudioSourceClass[]{"Audio/Source"}; +constexpr char AudioSourceVirtualClass[]{"Audio/Source/Virtual"}; constexpr char AudioDuplexClass[]{"Audio/Duplex"}; constexpr char StreamClass[]{"Stream/"}; @@ -853,7 +854,10 @@ void NodeProxy::infoCallback(const pw_node_info *info) NodeType ntype{}; if(al::strcasecmp(media_class, AudioSinkClass) == 0) ntype = NodeType::Sink; - else if(al::strcasecmp(media_class, AudioSourceClass) == 0) + else if( + al::strcasecmp(media_class, AudioSourceClass) == 0 + || al::strcasecmp(media_class, AudioSourceVirtualClass) == 0 + ) ntype = NodeType::Source; else if(al::strcasecmp(media_class, AudioDuplexClass) == 0) ntype = NodeType::Duplex; @@ -1094,6 +1098,7 @@ void EventManager::addCallback(uint32_t id, uint32_t, const char *type, uint32_t /* Specifically, audio sinks and sources (and duplexes). */ const bool isGood{al::strcasecmp(media_class, AudioSinkClass) == 0 || al::strcasecmp(media_class, AudioSourceClass) == 0 + || al::strcasecmp(media_class, AudioSourceVirtualClass) == 0 || al::strcasecmp(media_class, AudioDuplexClass) == 0}; if(!isGood) { |