Resolves the incompatibility between FluidSynth 1.x and 2.x
due to some API changes by shimming some functions.
Note that 1.x and 2.x are not binary compatible.
Some plugins don't initialise it themselves, expecting it already to be
done for them, and so are liable to hang without it (e.g. TX16Wx).
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
Co-authored-by: Dominic Clark <mrdomclark@gmail.com>
Changed according to feedback from AudioBlast. The flag used to be set most of the time, now it is only set when playback starts/stops, looping is toggled, or playback jumps around.
Ignore requests to change the I/O count from within processReplacing and print a warning instead; the shared memory is in use so it can't be reallocated. Add a special case to return immediately if the I/O count hasn't changed at all; this will prevent spurious warnings when the plugin is only updating the latency and should reduce unnecessary reallocations in general.
Some plugins ignore updates to these values if they're changed while the plugin is in a "resumed" state, resulting in incorrect tuning after a change of sample rate.
Writing the enable bit to `FF23` causes the noise oscillator to start outputting samples and writing the other registers (including the one for the SRW value) during the time the oscillator is active has undefined behaviour.
In order for `GB_apu` to correctly generate samples when the LSFR width is
set to `7`, the trigger write to `0xff23` must happen after all other
writes.
* Bug fix in peak_controller_effect.cpp
This change makes it so that when an LMMS project is loaded, each knob connected to a Peak Controller will be set to the Peak Controller's Base value, rather than its minimum possible value.
From MSDN: "In WM_SYSCOMMAND messages, the four low-order bits of the
wParam parameter are used internally by the system. To obtain the
correct result when testing the value of wParam, an application must
combine the value 0xFFF0 with the wParam value by using the bitwise AND
operator."
Also calculate the required window size using AdjustWindowRect, rather
than hard-coding some constants.
Fixes bugs where during project loading (observed with VST effects), empty
widgets and sub-windows would be left floating around. These were caused by
inconsistencies between the way VST UIs were created when loading a project
and when adding an effect in an existing project. In some situations, this
caused createUI to be called twice, leaving over multiple empty widgets.
This commit refactors some code in order to avoid creating unnecessary sub-
windows, which aren't needed with VST effects, but were still created,
usually being invisible. All sub-window related code was moved out of
VstPlugin into vestige.cpp, which is the only place where sub-window VSTs
are actually used. A new sub-class of VstPlugin, VstInstrumentPlugin, now
handles VST sub-windows and is used by vestigeInstrument.
"guivisible" attribute loading was moved out of VstPlugin as well and is
now done in VstEffectControls' and vestigeInstrument's loadSettings method
respectively. This causes some minor code duplication unfortunately.
Closes#4110