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.
The former virtuals returned `const char*`, which lead to invalid reads when
`LadspaSubPluginFeatures` returned pointers to temporary `QByteArray::data`.
Let CALF's CMakelists apply the name filter only on the basenames of the
files, but not on their directories. This prevents errors if the LMMS folder
is under a directory which contains, e.g., "lv2".
* Move m_key member of Effect into Plugin
* Pass key to Instrument ctors and instantiaters
* Add pluginKeys to all plugin selector widgets, and let them pass the keys
when instantiating the instruments; or, if the keys must be passed over
threads, pass the keys to the Engine using `Engine::setDndPluginKey()`
* As instrument plugin libraries now also need to get their key passed, their
second argument, which was always the same as the first, is now used to pass
the sub plugin keys. This affects *all* instrument plugins.
* Plugin.h: Add more virtuals to `SubPluginFeatures` in order to draw logos
and images into instrument selector widgets
* LadspaSubPluginFeatures: Implement the `displayName` virtual because the
new behaviour to resolve displayNames is to first look at the
SubPluginFeatures, which, without override, returns the superior plugin's
name (Plugin.cpp)
Additional:
* PluginFactory.h: Allow setting up search paths without discovering plugins
yet
* Plugin.h: Add full documentation (should be checked)
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.