-
Notifications
You must be signed in to change notification settings - Fork 259
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
audio.jack.autoconnect erroneously connects to MIDI ports #1149
Comments
I want to add that the used settings are audio.jack.multi=1 |
The purpose of that line fluidsynth/src/drivers/fluid_jack.c Line 635 in 97eefe9
is to check whether we have reached the end of the NULL terminated array of Jack's physical ports. Note that With your change, some of fluidsynth's ports are being connected twice (e.g. l05, l10, l15, r02, r07, r12): You probably meant to decrement fluidsynth/src/drivers/fluid_jack.c Lines 626 to 629 in 97eefe9
However, doing so is potentially dangerous as it might cause the loop to never terminate. I think it would be better to figure out why jack is failing to connect to these ports. Any details that caused the error? |
Thanks for the immediate response. Yes, I agree. My proposal from above is wrong but the solution is much more simple. "audio autoconnect" needs to be restricted to audio ports only :-). In line 615 of fluid_jack.cpp |
Oh, ofc. Thanks Reinhold! Just opened the PR. |
When using audio.jack.multi=1 not all ports and fx are connected, and as a consequence - after the bug happens - ports are connected alternating to the wrong output side. The bug is in fluid_jack.c line 637, 658
If jack_connect fails with err because jack_ports[o] won't exist "i" needs to be decremented. See "i--" added in order to connect port "i" to jack_ports[0] again. Otherwise port "i" does not get connected, and the following port gets connected to the wrong output side.
Here is the snapshot of fluid_jack.c starting with line 613
` if(autoconnect)
{
jack_ports = jack_get_ports(client, NULL, NULL, JackPortIsInput | JackPortIsPhysical);
I hope this is the final solution. Works fine in my setup. Can somebody double-check. Thx.
The text was updated successfully, but these errors were encountered: