Commit Graph

109 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
Johannes Lorenz
e0298891e4 clang-format: Prepare plugin descriptor init'ers 2021-09-22 22:46:12 +02:00
Alexandre Almeida
770d2498b5 Rename Mixer to AudioEngine (#6127) 2021-09-12 01:00:21 +02:00
thmueller64
89b13280de LB302: Use consistent cutoff frequency on mulitple sample rates (#5618) 2020-10-03 14:05:55 +09:00
Dat Ng
3d8b31039f Qt deprecation fix (#5619)
Qt6 TODO: Orientation check by comparing angleDelta().x() and y() won't make sense
because the direction is arbitrary in Qt 6.
2020-09-13 11:09:46 +09:00
Dominic Clark
5efb3a19cb Fix use of translation functions (#5629) 2020-08-30 19:27:17 +01:00
Johannes Lorenz
73c2c70d96 Merge branch 'variable-tab-widget' 2019-07-17 22:21:47 +02:00
Johannes Lorenz
aa8f9361c6 Rename InstrumentView250 to InstrumentViewFixedSize 2019-07-17 22:20:25 +02:00
Johannes Lorenz
a4df7a9765 Split InstrumentView into itself and InstrumentView250 2019-07-14 10:20:54 +02:00
Hussam al-Homsi
5431cc7942 Replace tLimit() with qBound() and remove templates.h (#5040)
* Replace tLimit() with qBound()

* Remove templates.h
2019-06-15 23:33:29 +03:00
Johannes Lorenz
a1b355828e Allow sub plugins for instruments aswell
* 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)
2018-12-27 21:24:19 +01:00
Lukas W
ff1c30e35d Merge remote-tracking branch 'lukas/cleanup/qt4'
# Conflicts:
#	cmake/toolchains/common/MSYS.cmake
2018-07-17 08:52:49 +02:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Lukas W
da1c78ce86 Remove Qt4 compatibility code 2018-06-17 12:47:12 +02:00
Hussam al-Homsi
6d46bd473f Remove "What's This?" and update tooltips (#4128) 2018-06-06 01:50:11 +03:00
Lukas W
ba2ed12f05 MSVC: EXPORT macro fixes 2017-11-22 11:08:47 +01:00
Michael Gregorius
b1af4c233f Introduce an enum to describe the VCA mode
Replace the integer encoding of the VCA mode with an enumeration.
2017-10-01 11:51:44 +02:00
Michael Gregorius
4fa96bc6c6 LB302: Move init of VCA members into constructor initializer list
Move the initialization of the members belonging to the VCA into
lb302Synth's constructor initializer list. This also removes a
duplication initialization of vca_mode from the code.
2017-10-01 11:51:44 +02:00
Michael Gregorius
b2a01ad8c3 Fix #3842: Opening a project with LB302 produces a noise burst
Fix the noise burst described in #3842 by removing the second
initialization of vca_a to 9 in the constructor of lb302Synth.
2017-10-01 11:51:44 +02:00
Lukas W
9f905bce3e Use Qt's Resource System (2nd approach) (#1891)
* Remove bin2res, use Qt's resource system
* Use QDir search paths and QImageReader in getIconPixmap
* Don't include "embed.cpp" in plugins
* getIconPixmap: Use QPixmapCache, use QPixmap::fromImageReader
* Require CMake 2.8.9

* Fix ReverbSC embed usage
2017-03-26 22:06:43 +02:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Fastigium
bfa83da572 Make lb302 include math.h so we can switch it to C++11
M_PI is no longer defined by default in C++11, but lb302.cpp needs it.
Therefore, before switching to C++11, we add an include.
2016-03-13 16:08:47 +01:00
Lukas W
8b0b2df38e Fix compilation for Qt 5.0 2015-06-21 15:41:26 +02:00
Augustin Cavalier
d6a5544233 lb302: remove unused MIN function. 2015-03-05 13:55:40 -05:00
Vesa
6f23ef7df2 Merge branch 'stable-1.1'
Conflicts:
	plugins/DualFilter/DualFilterControls.cpp
	src/gui/PluginBrowser.cpp
2014-12-16 23:12:02 +02:00
Tres Finocchiaro
b789eb9a69 Merge pull request #1449 from curlymorphic/I1432
Proposed fix for issue 1432 LB302 preset preview audio cut-off
2014-12-16 12:30:03 -05:00
Dave French
8d3637e754 Proposed fix for #1411 Crash on LB302 preset preview . 2014-12-16 16:51:06 +01:00
Tres Finocchiaro
5e8e52ff27 Merge pull request #1447 from curlymorphic/1411
Proposed fix for #1411 Crash on LB302 preset preview .
2014-12-16 08:53:59 -05:00
Dave French
f27ea7bc2b Proposed fix for #1432 LB302 preset preview audio cut-off 2014-12-15 21:40:58 +00:00
Dave French
f357bc7291 Proposed fix for #1411 Crash on LB302 preset preview . 2014-12-15 15:54:05 +00:00
dave
2295545ac6 Remove whitespace from setHintText, change spaces to tabs 2014-12-08 23:48:44 +00:00
dave
4993eba3c1 Remove unused and unnessary +" " in all knob.setHintText calls 2014-12-08 10:57:21 +00:00
Lukas W
1bbf7455a4 Rename a lot… 2014-11-26 10:09:49 +01:00
Lukas W
c33bef346a Rename automatable_button to AutomatableButton 2014-11-26 01:21:42 +01:00
Lukas W
968909c07c Rename engine to Engine 2014-11-26 00:49:55 +01:00
Vesa
857de8d2c8 Huge structural changes
Well, this commit got a bit out of hand, what with 26 files changed. Oh well.

Basically, we're using the buffermanager to dispense temporary buffers for playhandles and audioports to use.
This allows us to change the way playhandles work. Earlier, playhandles of the same track were waiting in line
to push their output to the audioport. This was of course inefficient, so now they just register themselves to the port,
then the port handles mixing the buffers.

Caveat: this is still a work in progress, the vol/pan knobs on instruments are temporarily non-functional - will be fixed in
the next commit, but I have to get some sleep now.
2014-11-18 13:58:39 +02: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
Vesa
066a9c9f92 LB302: Remove the non-functional Accent button from the UI, pending real implementation 2014-07-05 11:46:53 +03:00
Vesa
c93f6587e6 LB302: Correct slide for samplerate 2014-06-17 14:35:53 +03:00
Vesa
c45163f936 LB302: one last fix... 2014-06-14 14:32:15 +03:00
Vesa
11209593e0 Last LB302 fixes for now (I hope!) 2014-06-11 15:05:07 +03:00
Vesa
9af0d7af93 LB302: further fixes
- My earlier fixes caused some new issues, now I'm fixing them, this time I'm pretty sure there won't be anything I missed
2014-06-10 09:02:20 +03:00
Vesa
40407f6ce6 LB302: Fix playback bugs (sticking pitch), add bandlimited waves 2014-06-07 14:39:45 +03:00
Tobias Doerffel
6650dd356d NotePlayHandle, InstrumentFunctions: reworked stacking and arpeggio handling
Instead of having various flags for realizing the arpeggion functionality
use a more generic approach here using the recently introduced "origin"
property.
2014-03-26 11:40:32 +01:00
Paul Giblock
25f2eae67f Revert LB302 db24 switch
Invert it so 3-pole is used for DB24 mode again. Fixes #477
2014-03-22 01:03:28 -04:00
Raine M. Ekman
ab69c2d44b LB302: make filter selection sync with GUI on initialisation and preset load 2014-03-11 21:57:31 +02:00
Tobias Doerffel
3be2e89d37 DspEffectLibrary: renamed from effectLib 2014-02-23 14:41:23 +01:00
Paul Giblock
fc1475bf75 Fix leak in last commit
Sorry dudes. This one really fixes #353
2014-02-19 21:25:31 -05:00