Commit Graph

20 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
Dominic Clark
5efb3a19cb Fix use of translation functions (#5629) 2020-08-30 19:27:17 +01:00
Lukas W
187f7f58c7 Merge stable-1.2 into master 2020-05-12 11:18:14 +02:00
thmueller64
56fbefc700 Fix #5461 and ensure consistent use of check gate (#5475)
* Multiple effects: Calculation of `outSum` should be after D/W mixing
* CrossoverEQ.cpp: `outSum` must be divided by frames in the end 
* CrossoverEQ.cpp: don't overwrite `outSum` in for loop, but increment it
2020-05-06 11:23:40 +02:00
Lukas W
966bf1c6de Use CMake GenerateExportHeader 2018-07-07 11:20:54 +02:00
Lukas W
ba2ed12f05 MSVC: EXPORT macro fixes 2017-11-22 11:08:47 +01: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
Lukas W
85ed63be85 ValueBuffer related cleanups
* Move implementation to a new cpp file
* Use std::vector as base class instead of doing our own memory management
* Remove unused dangerous functions
* Make more use of std algorithms
* Some cleanups in code using ValueBuffer
2017-03-08 17:09:57 +01:00
grejppi
9e85d7c66e update all copyright headers to the proper url (#3326) 2017-02-06 02:41:15 +02:00
Dave French
be6f25b7a1 Enable sample exact controls for WaveShaper plugin
Enabled sample exactness for the input and output control.
2015-03-01 22:54:06 +00:00
Vesa
62df768896 Autoquit improvement: On effect plugins where it's possible for the FX to silence the output, measure the levels of the input signal for autoquit
This so that the effect won't be turned off when there's input that the effect is muting (eg. when you use the Amplifier to temporarily mute a signal)
2014-12-24 19:53:05 +02:00
Vesa
d7931fdb0d Some waveshaper improvements 2014-11-17 13:17:55 +02:00
Umcaruje
6fb923cba2 Correct the program name and site in the descriptions. 2014-11-04 22:56:50 +01:00
Vesa
9bef55c7f5 Add usage of linearInterpolate() to several places (mostly my plugins for now but i'll add more if i find them) 2014-04-05 02:23:17 +03:00
Vesa
bcd604edc6 Waveshaper, Dynamics processor: some code improvements 2014-03-09 15:31:03 +02:00
Vesa
9265913b73 Waveshaper updates: added amplitude +/- buttons, toggle led to clip input to 0dB, more helpful gridlines in wavegraph
Mallets: artwork update by Bill Y.
New knob: knob_vintage32, currently only used in Mallets, can be used for other things in the future (maybe if we get some more vintage-style synths/effects?)
Graph widget: added new drawing mode (bar style graph) for future use, currently unused anywhere, have plans
2014-02-14 18:22:04 +02:00
Vesa
201fa1d89a Waveshaper: added bg image for graph, made graph larger
Graph widget: added new functionality - ability to draw straight lines with shift-click
2014-02-12 13:21:55 +02:00
Vesa
2405a6a25e Waveshaper, first working version... 2014-02-11 15:19:04 +02:00
Vesa
30940fc112 Initial commit - copied files from bassbooster to modify into new plugin 2014-02-11 10:11:29 +02:00