Fix a crash that occurred on the following steps:
1. Add an AFP track.
2. Open it, and move the waveform display to overlap the track label
button.
3. Close the AFP window and open it again by clicking the track label.
4. Move the mouse pointer.
The problem occurs because the code makes the implicit assumption that
AudioFileProcessorWaveView::enterEvent (and hence
QApplication::setOverrideCursor) is called before
AudioFileProcessorWaveView::mouseMoveEvent. This is not the case when
the waveform display is on top of the track label. In this case the AFP
windows is opened with the mouse being immediately positioned over the
wave form display. There is no enter event and move events are issues
directly. This then leads to a crash in
AudioFileProcessorWaveView::mouseMoveEvent when trying to determine the
value for is_size_cursor because the override cursor is still null but
is dereferenced directly without checking.
Only adding a check would not solve the problem because in that case the
cursor would not change to the hand cursor when being moved inside the
waveform display.
The solution is to remove all calls to the global methods
setOverrideCursor and restoreOverrideCursor and to only set the cursor
locally.
This fix is based on a patch by gi0e5b06 which is committed under 8a10c52
in his repository but for which he never created a pull request.
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