Commit Graph

24 Commits

Author SHA1 Message Date
Levin Oehlmann
f742710758 Macro cleanup (#6095)
Summary:

* `NULL` -> `nullptr`
* `gui` -> Function `getGUI()`
* `pluginFactory` -> Function `getPluginFactory()`
* `assert` (redefinition) -> using `NDEBUG` instead, which standard `assert` respects.
* `powf` (C stdlib symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `exp10` (nonstandard function symbol clash) -> removed and all expansions replaced with calls to `std::pow`.
* `PATH_DEV_DSP` -> File-scope QString of identical name and value.
* `VST_SNC_SHM_KEY_FILE` -> constexpr char* with identical name and value.
* `MM_ALLOC` and `MM_FREE` -> Functions with identical name and implementation.
* `INVAL`, `OUTVAL`, etc. for automation nodes -> Functions with identical names and implementations.
* BandLimitedWave.h: All integer constant macros replaced with constexpr ints of same name and value.
* `FAST_RAND_MAX` -> constexpr int of same name and value.
* `QSTR_TO_STDSTR` -> Function with identical name and equivalent implementation.
* `CCONST` -> constexpr function template with identical name and implementation.
* `F_OPEN_UTF8` -> Function with identical name and equivalent implementation.
* `LADSPA_PATH_SEPARATOR` -> constexpr char with identical name and value.
* `UI_CTRL_KEY` -> constexpr char* with identical name and value.
* `ALIGN_SIZE` -> Renamed to `LMMS_ALIGN_SIZE` and converted from a macro to a constexpr size_t.
* `JACK_MIDI_BUFFER_MAX` -> constexpr size_t with identical name and value.
* versioninfo.h: `PLATFORM`, `MACHINE` and `COMPILER_VERSION` -> prefixed with `LMMS_BUILDCONF_` and converted from macros to constexpr char* literals.
* Header guard _OSCILLOSCOPE -> renamed to OSCILLOSCOPE_H
* Header guard _TIME_DISPLAY_WIDGET -> renamed to TIME_DISPLAY_WIDGET_H
* C-style typecasts in DrumSynth.cpp have been replaced with `static_cast`.
* constexpr numerical constants are initialized with assignment notation instead of curly brace intializers.
* In portsmf, `Alg_seq::operator[]` will throw an exception instead of returning null if the operator index is out of range.

Additionally, in many places, global constants that were declared as `const T foo = bar;` were changed from const to constexpr, leaving them const and making them potentially evaluable at compile time.

Some macros that only appeared in single source files and were unused in those files have been removed entirely.
2021-09-30 18:01:27 +02:00
Dominic Clark
5efb3a19cb Fix use of translation functions (#5629) 2020-08-30 19:27:17 +01:00
Ibuki
1e8fcbdf2d Show VST parameter string (#5321) 2020-05-17 11:15:39 +09:00
Hyunjin Song
4dce466873 Remove some Qt4 compatibility code 2019-03-27 07:05:38 +09:00
Hyunjin Song
231a8407e8 Merge branch 'stable-1.2'
# Conflicts:
#	.travis.yml
#	.travis/linux..script.sh
#	.travis/linux.win32.script.sh
#	.travis/linux.win64.script.sh
#	.travis/osx..install.sh
#	.travis/osx..script.sh
#	data/locale/en.ts
#	data/locale/id.ts
#	include/Graph.h
#	include/VstSyncController.h
#	include/lmms_math.h
#	plugins/vst_base/RemoteVstPlugin.cpp
#	src/core/RemotePlugin.cpp
#	src/core/Song.cpp
#	src/core/Track.cpp
#	src/gui/SubWindow.cpp
#	src/gui/widgets/Graph.cpp
2019-02-24 20:45:52 +09:00
Dominic Clark
2070ef21f5 Handle automation on processing thread (#4692) 2018-11-13 07:24:08 +09:00
Hyunjin Song
4069aaada2 Merge branch 'stable-1.2'
# Conflicts:
#	.travis/osx..install.sh
#	CMakeLists.txt
#	cmake/apple/install_apple.sh.in
#	doc/lmms.1
#	include/VstSyncController.h
#	plugins/carlabase/carla.h
#	plugins/vestige/vestige.cpp
#	plugins/vst_base/CMakeLists.txt
#	plugins/vst_base/RemoteVstPlugin.cpp
#	plugins/vst_base/Win64/CMakeLists.txt
#	plugins/zynaddsubfx/zynaddsubfx
#	plugins/zynaddsubfx/zynaddsubfx/src/Misc/QtXmlWrapper.cpp
#	src/core/Song.cpp
#	src/core/main.cpp
2018-09-18 09:54:38 +09:00
Hyunjin Song
f37ca49e6d Fix decimal separator handling (#4547)
Makes LMMS can handle both periods and commas properly when loading real numbers.
2018-09-12 11:02:40 +09:00
Lukas W
f245d7454b MSVC: Enable VstEffect 2018-07-27 18:03:51 +02:00
Lukas W
a87aa7e356 Merge branch 'stable-1.2'
# Conflicts:
#	src/gui/widgets/EffectView.cpp
2018-06-17 11:51:50 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Hyunin Song
24ae559de5 Fix crash when re-opening VST effect manage dialog
Unset Qt::WA_DeleteOnClose for the dialog to avoid deletion when closed
2018-05-30 09:02:05 +09:00
Hyunin Song
235e8eef6f Allow controlling VST effects without own GUI 2018-05-30 09:02:05 +09:00
Lukas W
a2cb7e96ea Fix VST sub-window creation glitches in project loading
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
2018-05-30 09:02:05 +09:00
Dominic Clark
27007c258a Fix command line rendering with VSTs (#4093)
Fix command line rendering with VSTs
2018-01-26 10:48:46 -05:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Colin Wallace
908591ba7d Have MainWindow and others make use of the new SubWindow class 2015-06-15 03:32:25 +00:00
Lukas W
1ee93409d1 Move Engine' GUI code to new GuiApplication class 2014-12-17 23:25:55 +01:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00
Lukas W
968909c07c Rename engine to Engine 2014-11-26 00:49:55 +01:00
Lukas W
8e8879f735 Merge stable-1.1
Conflicts:
	include/ConfigManager.h
	include/MidiTime.h
	include/string_pair_drag.h
	src/gui/string_pair_drag.cpp
	src/gui/widgets/rubberband.cpp
2014-11-10 19:26:59 +01:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Tobias Doerffel
4cee046909 Added initial Qt5 support
LMMS now properly builds and runs with Qt5. Various deprecated functions
had to be replaced like QString::toAscii()/fromAscii(). Also occurences
of FALSE/TRUE have been replaced with false/true.

LmmsStyle now derives from QProxyStyle and sets a style instance as base
style (Plastique for Qt4, Fusion for Qt5).

MOC files are not included anymore but added as regular source files.

What's missing is support for embedding VST plugins into a subwindow
inside LMMS on Linux/X11 due to missing QX11EmbedContainer class in Qt5.

Build instructions can be found in INSTALL.Qt5

Minimum version requirement for Qt4 has been raised to 4.6.0 for best
API compatibility between Qt4 and Qt5.
2014-08-14 17:34:49 +02:00
Tobias Doerffel
408c98f473 VstEffect: fixed some messages 2014-02-23 15:08:19 +01:00