Commit d52565c 1 parent 5a12732 commit d52565c Copy full SHA for d52565c
File tree 7 files changed +15
-6
lines changed
7 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.21)
2
- project (venmic LANGUAGES CXX VERSION 5 .0.0)
2
+ project (venmic LANGUAGES CXX VERSION 6 .0.0)
3
3
4
4
# --------------------------------------------------------------------------------------------------------
5
5
# Library options
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ The Rest-Server exposes three simple endpoints
56
56
The setting ` ignore_devices ` is optional and will default to ` true ` .
57
57
When enabled it will prevent hardware-devices like speakers and microphones from being linked to the virtual microphone.
58
58
59
+ The setting ` only_speakers ` is optional and will default to ` true ` .
60
+ When enabled it will prevent linking against nodes that don't play to a speaker.
61
+
59
62
The setting ` only_default_speakers ` is optional and will default to ` true ` .
60
63
When enabled it will prevent linking against nodes that don't play to the default speaker.
61
64
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ struct patchbay : public Napi::ObjectWrap<patchbay>
171
171
auto include = to_array<vencord::node>(data.Get (" include" ));
172
172
auto exclude = to_array<vencord::node>(data.Get (" exclude" ));
173
173
auto ignore_devices = convert<bool >(data.Get (" ignore_devices" ));
174
+ auto only_speakers = convert<bool >(data.Get (" only_speakers" ));
174
175
auto only_default_speakers = convert<bool >(data.Get (" only_default_speakers" ));
175
176
auto workaround = to_array<vencord::node>(data.Get (" workaround" ));
176
177
@@ -187,6 +188,7 @@ struct patchbay : public Napi::ObjectWrap<patchbay>
187
188
.include = include.value_or (std::vector<vencord::node>{}),
188
189
.exclude = exclude.value_or (std::vector<vencord::node>{}),
189
190
.ignore_devices = ignore_devices.value_or (true ),
191
+ .only_speakers = only_speakers.value_or (true ),
190
192
.only_default_speakers = only_default_speakers.value_or (true ),
191
193
.workaround = workaround.value_or (std::vector<vencord::node>{}),
192
194
});
Original file line number Diff line number Diff line change @@ -15,7 +15,9 @@ namespace vencord
15
15
std::vector<node> exclude;
16
16
17
17
public:
18
- bool ignore_devices{true }; // Only link against non-device nodes
18
+ bool ignore_devices{true }; // Only link against non-device nodes
19
+ public:
20
+ bool only_speakers{true }; // Ignore nodes that don't play to speakers
19
21
bool only_default_speakers{true }; // Ignore nodes that don't play to the default speaker
20
22
21
23
public:
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ export interface LinkData
18
18
exclude : Node [ ] ;
19
19
20
20
ignore_devices ?: boolean ;
21
+
22
+ only_speakers ?: boolean ;
21
23
only_default_speakers ?: boolean ;
22
24
23
25
workaround ?: Node [ ] ;
Original file line number Diff line number Diff line change 11
11
"private" : false ,
12
12
"license" : " MPL-2.0" ,
13
13
"author" : " Curve (https://github.com/Curve)" ,
14
- "version" : " 5 .0.0" ,
14
+ "version" : " 6 .0.0" ,
15
15
"main" : " ./lib/index.js" ,
16
16
"types" : " ./lib/module.d.ts" ,
17
17
"scripts" : {
Original file line number Diff line number Diff line change @@ -305,16 +305,16 @@ namespace vencord
305
305
306
306
if (options.only_default_speakers && input_id != speaker->id )
307
307
{
308
- logger::get ()->trace (" [patchbay] (on_link) {} is not connected to speaker but with {}" , id, input_id);
308
+ logger::get ()->debug (" [patchbay] (on_link) {} is not connected to speaker but with {}" , id, input_id);
309
309
return ;
310
310
}
311
311
312
312
auto output_props = nodes[output_id].info .props ; // The node emitting sound
313
313
auto input_props = nodes[input_id].info .props ; // The node receiving sound
314
314
315
- if (! options.only_default_speakers && input_props[" device.id" ].empty ())
315
+ if (options.only_speakers && input_props[" device.id" ].empty ())
316
316
{
317
- logger::get ()->trace (" [patchbay] (on_link) {} is not playing to a device: {}" , id, input_id);
317
+ logger::get ()->debug (" [patchbay] (on_link) {} is not playing to a device: {}" , id, input_id);
318
318
return ;
319
319
}
320
320
You can’t perform that action at this time.
0 commit comments