-
Notifications
You must be signed in to change notification settings - Fork 28
put _wrap_port_ptr calls in try statment, to avoid errors when port is nor audio nor midi #146
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
base: master
Are you sure you want to change the base?
Conversation
…s nor audio nor midi
|
Thanks for this PR, and sorry for my late response. I agree that this is a problem that should be solved, but I'm not sure if catching an An assertion happens only when there is a bug, and I see only two ways to proceed: Either the bug should be fixed (and the Catching an Creating an Another option would probably be to create an What do you think about that? |
|
You are right, we can consider that I like the idea of an The problem is that it breaks this lib API which only provide AUDIO or MIDI ports (for example in port register callback). A solution to solve this is to add a keyword argument ( Then the How does it sounds ? |
OK, I guess we can also provide those methods. Maybe in this case we can even use Would it make sense to have an But probably without
Yes, that makes sense.
They currently only provide AUDIO or MIDI because the code is not aware of any other types. But why should it not provide additional port types once they exist?
Why not allow all callbacks unconditionally?
Yes, I think this would make sense.
Sounds great! |
I think to the case someone has written a such thing in the port register callback but maybe we can consider it is not a big deal. FYI there are also 3 other default types added with pipewire : https://gitlab.com/pipewire/pipewire/-/blob/master/pipewire-jack/src/pipewire-jack-extensions.h?ref_type=heads .
It's not a big deal if we don't implement this, user will achieve to consider them with the Port.type property. If you see no objection, I can work on another PR managing UnknownPort this week-end ! |
|
Yes, I think we should consider this a breaking change. We should increase the version number to 0.6 and mention this in the release notes. We'll see if people complain about this, but I'm willing to take the risk.
I agree. For now, any new types will be "unknown". But if anyone needs special support for new types, we can add more port classes (in future PRs).
No objections! |
catching a redondant AssertionError in RaySession: Houston4444/RaySession#269, I saw that, for a reason I ignore now, some ports are created and destroyed quickly by KDE Plasma under Wayland. These ports are not audio nor midi, they are of type 'other'. I am ok to find it strange, but I don't think that anything prevent this in JACK (here it is PipeWire).
So, the idea of this PR is to not display the error when a port has other type than _AUDIO or _MIDI, because it is not forbidden by the JACK API.
Another possibility would be to create another class OtherPort (and OwnOtherPort).