Skip to content

Commit 5a12732

Browse files
committed
refactor(patchbay)!: remove ignore_input_media
* Clients can easily handle this themselves by excluding `"media.class": "Stream/Input/Audio"`
1 parent bcafa10 commit 5a12732

File tree

7 files changed

+4
-20
lines changed

7 files changed

+4
-20
lines changed

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.21)
2-
project(venmic LANGUAGES CXX VERSION 4.0.2)
2+
project(venmic LANGUAGES CXX VERSION 5.0.0)
33

44
# --------------------------------------------------------------------------------------------------------
55
# Library options

Diff for: README.md

-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ The Rest-Server exposes three simple endpoints
5959
The setting `only_default_speakers` is optional and will default to `true`.
6060
When enabled it will prevent linking against nodes that don't play to the default speaker.
6161

62-
The setting `ignore_input_media` is optional and will default to `true`.
63-
When enabled it will prevent linking against nodes have a "Input" media-class.
64-
6562
The setting `workaround` is also optional and will default to an empty array.
6663
When set, venmic will redirect the first node that matches all of the specified properties to itself.
6764
</blockquote>

Diff for: addon/addon.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ struct patchbay : public Napi::ObjectWrap<patchbay>
171171
auto include = to_array<vencord::node>(data.Get("include"));
172172
auto exclude = to_array<vencord::node>(data.Get("exclude"));
173173
auto ignore_devices = convert<bool>(data.Get("ignore_devices"));
174-
auto ignore_input_media = convert<bool>(data.Get("ignore_input_media"));
175174
auto only_default_speakers = convert<bool>(data.Get("only_default_speakers"));
176175
auto workaround = to_array<vencord::node>(data.Get("workaround"));
177176

@@ -188,7 +187,6 @@ struct patchbay : public Napi::ObjectWrap<patchbay>
188187
.include = include.value_or(std::vector<vencord::node>{}),
189188
.exclude = exclude.value_or(std::vector<vencord::node>{}),
190189
.ignore_devices = ignore_devices.value_or(true),
191-
.ignore_input_media = ignore_input_media.value_or(true),
192190
.only_default_speakers = only_default_speakers.value_or(true),
193191
.workaround = workaround.value_or(std::vector<vencord::node>{}),
194192
});

Diff for: include/vencord/patchbay.hpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ namespace vencord
1515
std::vector<node> exclude;
1616

1717
public:
18-
bool ignore_devices{true}; // Only link against non-device nodes
19-
bool ignore_input_media{true}; // Ignore Nodes that have "Input" in their media class
20-
21-
public:
22-
bool only_default_speakers{true};
18+
bool ignore_devices{true}; // Only link against non-device nodes
19+
bool only_default_speakers{true}; // Ignore nodes that don't play to the default speaker
2320

2421
public:
2522
std::vector<node> workaround;

Diff for: lib/module.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export interface LinkData
1818
exclude: Node[];
1919

2020
ignore_devices?: boolean;
21-
ignore_input_media?: boolean;
2221
only_default_speakers?: boolean;
2322

2423
workaround?: Node[];

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"private": false,
1212
"license": "MPL-2.0",
1313
"author": "Curve (https://github.com/Curve)",
14-
"version": "4.0.2",
14+
"version": "5.0.0",
1515
"main": "./lib/index.js",
1616
"types": "./lib/module.d.ts",
1717
"scripts": {

Diff for: src/patchbay.impl.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -228,13 +228,6 @@ namespace vencord
228228
return;
229229
}
230230

231-
if (options.ignore_input_media && props["media.class"].find("Input") != std::string::npos)
232-
{
233-
logger::get()->warn("[patchbay] (link) prevented link to node with input class: {} (\"{}\")", id,
234-
props["media.class"]);
235-
return;
236-
}
237-
238231
logger::get()->debug("[patchbay] (link) linking {}", id);
239232

240233
auto mapping = map_ports(target);

0 commit comments

Comments
 (0)