Commit Graph

8 Commits

Author SHA1 Message Date
Johannes Lorenz
34ab5ff730 Fixes #6626: Throw if Lv2 object CTORs fail (#6951)
On plugin instantiation failure, `Lv2Proc::m_valid` was being set to false. However, `Lv2Proc::run` did not evaluate `m_valid` and still called `lilv_instance_run`, which caused undefined behavior, including crashes.

This bug fixes this by not even create such zombie classes, and instead `throw`s right away. The throws are caught in `lmms_plugin_main`, as suggested in the PR discussion and as the VST3 approach.
2024-02-18 15:56:45 +01:00
Johannes Lorenz
5b84b65236 Lv2: Update copyright 2023-02-21 21:03:00 +01:00
Johannes Lorenz
f48dd0fb1f Fixes #6401: Reload Lv2 plugin on SR change
This also includes banning blop's wavedata plugins, because they crash
on reloading. Reference: https://gitlab.com/drobilla/blop-lv2/-/issues/3
2023-02-21 21:03:00 +01:00
Johannes Lorenz
7649f5ed24 Lv2ControlBase: Remove unused virtuals
They were never used. Possibly they were just in the code because the
code originated from #4662 (where the virtuals would also be
omittable...).
2023-02-21 21:03:00 +01:00
Levin Oehlmann
7227c89847 Namespace lmms (#6174)
This PR places all LMMS symbols into namespaces to eliminate any potential future name collisions between LMMS and third-party modules.

Also, this PR changes back `LmmsCore` to `Engine`, reverting c519921306 .

Co-authored-by: allejok96 <allejok96@gmail.com>
2022-06-19 20:08:46 +02:00
Johannes Lorenz
7db3fa94a1 Improve includes (#6320)
* Update ringbuffer submodule to fix includes

* Remove cyclic includes

* Remove Qt include prefixes

* Include C++ versions of C headers

E.g.: assert.h -> cassert

* Move CLIP_BORDER_WIDTH into ClipView

This allows to remove includes to TrackView.h in ClipView cpp files.

* Elliminate useless includes

This improves the include structure by elliminating includes that are
not used. Most of this was done by using `include-what-you-use` with
`CMAKE_C_INCLUDE_WHAT_YOU_USE` and `CMAKE_CXX_INCLUDE_WHAT_YOU_USE`
set to (broken down here):

```
include-what-you-use;
    -Xiwyu;--mapping_file=/usr/share/include-what-you-use/qt5_11.imp;
    -Xiwyu;--keep=*/xmmintrin.h;
    -Xiwyu;--keep=*/lmmsconfig.h;
    -Xiwyu;--keep=*/weak_libjack.h;
    -Xiwyu;--keep=*/sys/*;
    -Xiwyu;--keep=*/debug.h;
    -Xiwyu;--keep=*/SDL/*;
    -Xiwyu;--keep=*/alsa/*;
    -Xiwyu;--keep=*/FL/x.h;
    -Xiwyu;--keep=*/MidiApple.h;
    -Xiwyu;--keep=*/MidiWinMM.h;
    -Xiwyu;--keep=*/AudioSoundIo.h
```

* Fixup: Remove empty #if-#ifdef pairs

* Remove LMMS_HAVE_STD(LIB|INT)_H
2022-03-02 13:30:43 +01:00
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
Johannes Lorenz
2a66e83f53 Lv2 core implementation
Implementation of the Lv2 core, except for CV ports. No features or
extensions are supported yet.

You can now generate sound using Lv2 instruments (restricted to non-piano)
or effects.

For an explenation about the new classes, see Lv2Manager.h
2020-05-24 12:50:50 +02:00