Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add monitoring of input ports #20

Merged
merged 3 commits into from
Jun 29, 2023
Merged

Conversation

peterfab9845
Copy link
Contributor

@peterfab9845 peterfab9845 commented Nov 24, 2021

This PR adds the ability to "monitor" input ports, similar to the way jack_capture makes its connections.
Specifically, if an input port is matched as the first pattern, then each of the output ports connected to that input port will be connected to the input port matched in the second pattern.

The easiest demonstration is likely visual:
image
First, jack-matchmaker 'system:playback_1' 'simple:input' was started. Then, the simple device was registered.
Upon registration, jack-matchmaker connected its input port to the same input ports as system:playback_1.

I have code stashed to add a callback for new connections, so that they get captured also; however, this causes a new refresh to happen each time the connections are updated by jack-matchmaker as well. Additionally, monitoring the removal of connections to match would be a much more significant change.

@peterfab9845
Copy link
Contributor Author

On the other hand, it could be confusing if new connections are only copied when a new device appears. Related to #19

@SpotlightKid SpotlightKid self-requested a review November 28, 2021 17:20
Copy link
Owner

@SpotlightKid SpotlightKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry that it took ages to look at this.

Looks good in principle, but this covers only part of the needed functionality to make this really useful, IMO. New connections need also to be watched, so that when new connections to the input port in the first pattern are made, these will also trigger a new connection from the source port to the input port(s) matched by the second pattern.

But I will merge this now and ad that later.

@SpotlightKid SpotlightKid merged commit 8d05fba into SpotlightKid:master Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants