-
Notifications
You must be signed in to change notification settings - Fork 260
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
Handle early the "set" commands from the configuration file. #737
Conversation
That prevents warnings about changing a non-realtime parameter set command is issued, but the value is identical to the previous one.
When fluid_shell is called from fluid_source(), is is currently printing this message: Received EOF while reading commands, exiting the shell. Suppress it.
This pull request introduces 1 alert when merging fc693b2 into 4bfeff5 - view on LGTM.com new alerts:
|
Let's parse the realtime set commands after creating the synth, as otherwise, it might cause regressions on someone's config file that could be relying at the old behavior.
This pull request introduces 1 alert when merging 04c98d3 into 4bfeff5 - view on LGTM.com new alerts:
|
Ok, thanks. Patches 1 and 3 are fine. Patch 4 won't work, because And I don't quite like patch 2 because
I'll make a counter proposal for it upcoming weekend (hopefully). |
Good!
Ok. Let's drop it.
I opted for this strategy due to a few reasons:
Ok. Whatever works best. |
I've implemented my original idea in #739. Briefly tested it, seems to work. Pls. have another test.
|
Worked fine, but I had to add this patch: More details on my comment to PR #739.
OK! Yeah, this solution is indeed more elegant than this original PR. |
Ok, I see. This problem is not limited to settings commands. It could happen with router commands as well. I fixed that.
Sorry, but there is no comment. |
Sorry! I forgot to click at the "submit review" button. Just submitted it. Anyway, your solution of registering a NULL handler for the other commands seem more elegant. I'll re-test again with the new patch probably tomorrow. |
Superseded by #739. |
As discussed at issue #724, if no-realtime set commands are used inside
a configuration file, fluidsynth can be on an invalid state, where the synth will be using a different setting than the modules that are initialized after parsing the command.
In order to solve it, parse earlier the set commands.
There are 4 patches on this series.
Patch 1 changes the function which handles the
set
command: it will now verify if the value actually changed. That prevents printing realtime warnings when the value was not changed;Patch 2 adds a new CMD parser that handles only
set
commands, and is called before initializing the synth;Patch 3 avoid prints a warning when the commands from config files are parsed.
Patch 4 ensures that the new early parsing logic is only used for settings that can't be changed in real time. I'm not sure if this is needed, but it should prevent backward-compatibility issues, if some config file was using
set
for realtime parameters, and are relying on them being processed only after other commands. Probably overkill, but it shouldn't hurt to add this one to the series.This solves issue #724. This replaces the approach taken at PR #725.