Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master temp rossmaxx merge (#17) #19

Merged
merged 1 commit into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
SET(LMMS_BINARY_DIR ${CMAKE_BINARY_DIR})
SET(LMMS_SOURCE_DIR ${CMAKE_SOURCE_DIR})

# CMAKE_POLICY Section
IF(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0005 NEW)
CMAKE_POLICY(SET CMP0003 NEW)
IF (CMAKE_MAJOR_VERSION GREATER 2)
CMAKE_POLICY(SET CMP0026 NEW)
CMAKE_POLICY(SET CMP0045 NEW)
CMAKE_POLICY(SET CMP0050 OLD)
ENDIF()
CMAKE_POLICY(SET CMP0020 NEW)
CMAKE_POLICY(SET CMP0057 NEW)
# TODO: Keep CMP0074 but remove this condition when cmake 3.12+ is guaranteed
IF(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.12)
# Needed for the SWH Ladspa plugins. See below.
CMAKE_POLICY(SET CMP0074 NEW) # find_package() uses <PackageName>_ROOT variables
ENDIF()
ENDIF(COMMAND CMAKE_POLICY)

# Import of windows.h breaks min()/max()
ADD_DEFINITIONS(-DNOMINMAX)

Expand Down Expand Up @@ -299,6 +317,11 @@ ELSE(WANT_CMT)
ENDIF(WANT_CMT)

IF(WANT_SWH)
IF(LMMS_BUILD_APPLE)
# Prefer system perl over Homebrew, MacPorts, etc
SET(Perl_ROOT "/usr/bin")
ENDIF()
FIND_PACKAGE(Perl)
IF(PERL_FOUND)
SET(LMMS_HAVE_SWH TRUE)
SET(STATUS_SWH "OK")
Expand Down
66 changes: 66 additions & 0 deletions CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"configurations": [
{
"name": "x64-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"variables": [
{
"name": "Qt5_DIR",
"value": "C:/Qt/5.15.2/msvc2019_64/lib/cmake",
"type": "PATH"
},
{
"name": "Qt5Test_DIR",
"value": "C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5Test",
"type": "PATH"
},
{
"name": "PERL_EXECUTABLE",
"value": "C:/Strawberry/perl/bin/perl.exe",
"type": "FILEPATH"
},
{
"name": "VCPKG_TRACE_FIND_PACKAGE",
"value": "ON",
"type": "STRING"
}
],
"cmakeToolchain": "C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
},
{
"name": "x64-Release",
"generator": "Ninja",
"configurationType": "Release",
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeToolchain": "C:/vcpkg/scripts/buildsystems/vcpkg.cmake",
"inheritEnvironments": [ "msvc_x64" ],
"variables": [
{
"name": "Qt5_DIR",
"value": "C:/Qt/5.15.2/msvc2019_64/lib/cmake",
"type": "PATH"
},
{
"name": "Qt5Test_DIR",
"value": "C:/Qt/5.15.2/msvc2019_64/lib/cmake/Qt5Test",
"type": "PATH"
},
{
"name": "PERL_EXECUTABLE",
"value": "C:/Strawberry/perl/bin/perl.exe",
"type": "FILEPATH"
},
{
"name": "VCPKG_TRACE_FIND_PACKAGE",
"value": "ON",
"type": "STRING"
}
]
}
]
}
8 changes: 0 additions & 8 deletions cmake/modules/PluginList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,3 @@ IF(LIST_PLUGINS)
LIST_ALL_PLUGINS()
ENDIF()

IF(MSVC)
SET(MSVC_INCOMPATIBLE_PLUGINS
LadspaEffect
)
message(WARNING "Compiling with MSVC. The following plugins are not available: ${MSVC_INCOMPATIBLE_PLUGINS}")
LIST(REMOVE_ITEM PLUGIN_LIST ${MSVC_INCOMPATIBLE_PLUGINS})
ENDIF()

3 changes: 3 additions & 0 deletions include/ladspa.h
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ typedef struct _LADSPA_Descriptor {
returning NULL, so the plugin count can be determined by checking
for the least index that results in NULL being returned. */

#ifdef _MSC_VER
__declspec(dllexport)
#endif
const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index);

/* Datatype corresponding to the ladspa_descriptor() function. */
Expand Down
5 changes: 4 additions & 1 deletion plugins/LadspaEffect/calf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ SET(INLINE_FLAGS "")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(INLINE_FLAGS -finline-functions-called-once -finline-limit=80)
ENDIF()
target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS})

IF(NOT MSVC)
target_compile_options(veal PRIVATE -fexceptions -O2 -finline-functions ${INLINE_FLAGS})
endif()

if(LMMS_BUILD_WIN32)
add_custom_command(
Expand Down
2 changes: 1 addition & 1 deletion plugins/LadspaEffect/calf/veal
Submodule veal updated 52 files
+4 −0 ChangeLog
+66 −15 calf-gui.xml
+2 −2 configure.ac
+18 −1 doc/manuals/Limiter.html
+6 −1 doc/manuals/Multiband Limiter.html
+5 −0 doc/manuals/Sidechain Limiter.html
+ doc/manuals/images/Calf - Limiters - ASC behaviours.jpg
+ doc/manuals/images/Calf - Limiters - ASC.jpg
+1 −1 gui/gui/eq30.xml
+17 −16 gui/gui/limiter.xml
+15 −12 gui/gui/multibandlimiter.xml
+12 −9 gui/gui/sidechainlimiter.xml
+58 −48 src/analyzer.cpp
+37 −21 src/audio_fx.cpp
+1 −0 src/calf/audio_fx.h
+4 −0 src/calf/biquad.h
+4 −4 src/calf/fixed_point.h
+2 −2 src/calf/giface.h
+2 −0 src/calf/gui.h
+2 −0 src/calf/gui_config.h
+2 −0 src/calf/host_session.h
+2 −2 src/calf/jackhost.h
+5 −0 src/calf/loudness.h
+1 −1 src/calf/lv2_options.h
+1 −1 src/calf/lv2_ui.h
+3 −3 src/calf/lv2wrap.h
+3 −0 src/calf/metadata.h
+9 −9 src/calf/modules_filter.h
+1,373 −1,089 src/calf/orfanidis_eq.h
+7 −3 src/calf/osctl.h
+6 −0 src/calf/primitives.h
+14 −3 src/calf/utils.h
+1 −4 src/ctl_knob.cpp
+0 −3 src/ctl_tube.cpp
+25 −0 src/fluidsynth.cpp
+9 −3 src/giface.cpp
+92 −67 src/gtk_main_win.cpp
+16 −10 src/gui_config.cpp
+37 −18 src/host_session.cpp
+21 −6 src/jackhost.cpp
+1 −1 src/makerdf.cpp
+6 −2 src/metadata.cpp
+72 −72 src/modules_comp.cpp
+4 −3 src/modules_delay.cpp
+38 −12 src/modules_dist.cpp
+82 −75 src/modules_filter.cpp
+26 −17 src/modules_limit.cpp
+26 −26 src/modules_mod.cpp
+10 −9 src/modules_tools.cpp
+2 −1 src/organ.cpp
+26 −1 src/utils.cpp
+0 −1 src/veal.cpp
6 changes: 5 additions & 1 deletion plugins/LadspaEffect/caps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ IF(LMMS_BUILD_WIN64)
ADD_DEFINITIONS(-DLMMS_BUILD_WIN64)
ENDIF(LMMS_BUILD_WIN64)
SET_TARGET_PROPERTIES(caps PROPERTIES PREFIX "")
SET_TARGET_PROPERTIES(caps PROPERTIES COMPILE_FLAGS "-O2 -funroll-loops -Wno-write-strings")

IF(NOT MSVC)
SET_TARGET_PROPERTIES(caps PROPERTIES COMPILE_FLAGS "-O2 -funroll-loops -Wno-write-strings")
ENDIF()

IF(LMMS_BUILD_WIN32)
add_custom_command(
Expand All @@ -18,6 +21,7 @@ IF(LMMS_BUILD_WIN32)
COMMAND_EXPAND_LISTS
)
ENDIF(LMMS_BUILD_WIN32)

IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(caps PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
ENDIF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
Expand Down
11 changes: 7 additions & 4 deletions plugins/LadspaEffect/caps/basics.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,17 @@
#define _ISOC99_SOURCE 1
#define _ISOC9X_SOURCE 1

#include <assert.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>

#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#include <math.h>

#include <assert.h>
#include <stdio.h>
#include <stdint.h>

#include <ladspa.h>

Expand Down Expand Up @@ -76,7 +79,7 @@

#define MIN_GAIN .000001 /* -120 dB */

/* smallest non-denormal 32 bit IEEE float is 1.18×10-38 */
/* smallest non-denormal 32 bit IEEE float is 1.18*10^-38 */
#define NOISE_FLOOR .00000000000005 /* -266 dB */

typedef int8_t int8;
Expand Down
9 changes: 6 additions & 3 deletions plugins/LadspaEffect/caps/dsp/Eq.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/


#include "../basics.h"

#ifndef _DSP_EQ_H_
#define _DSP_EQ_H_

Expand Down Expand Up @@ -62,11 +65,11 @@ class Eq
{
public:
/* recursion coefficients, 3 per band */
eq_sample __attribute__ ((aligned)) a[Bands], b[Bands], c[Bands];
eq_sample a[Bands], b[Bands], c[Bands];
/* past outputs, 2 per band */
eq_sample __attribute__ ((aligned)) y[2][Bands];
eq_sample y[2][Bands];
/* current gain and recursion factor, each 1 per band = 2 */
eq_sample __attribute__ ((aligned)) gain[Bands], gf[Bands];
eq_sample gain[Bands], gf[Bands];
/* input history */
eq_sample x[2];
/* history index */
Expand Down
2 changes: 2 additions & 0 deletions plugins/LadspaEffect/caps/dsp/OnePole.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/

#include "../basics.h"

#ifndef _ONE_POLE_H_
#define _ONE_POLE_H_

Expand Down
3 changes: 3 additions & 0 deletions plugins/LadspaEffect/caps/dsp/SVF.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@
}
*/

#include "../basics.h"

#ifndef _DSP_SVF_H_
#define _DSP_SVF_H_


namespace DSP {

template <int OVERSAMPLE>
Expand Down
2 changes: 2 additions & 0 deletions plugins/LadspaEffect/caps/dsp/Sine.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
02111-1307, USA or point your web browser to http://www.gnu.org.
*/

#include "../basics.h"

#ifndef _DSP_SINE_H_
#define _DSP_SINE_H_

Expand Down
24 changes: 9 additions & 15 deletions plugins/LadspaEffect/caps/interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
(2541 - 2580 donated to [email protected])
*/

#include <sys/time.h>

#include "basics.h"

#include "Cabinet.h"
Expand Down Expand Up @@ -58,18 +56,8 @@
#define N 39
static DescriptorStub * descriptors [N];

/*static inline void
seed()
{
static struct timeval tv;
gettimeofday (&tv, 0);

srand (tv.tv_sec ^ tv.tv_usec);
}*/

extern "C" {

__attribute__ ((constructor))
void caps_so_init()
{
DescriptorStub ** d = descriptors;
Expand Down Expand Up @@ -121,11 +109,8 @@ void caps_so_init()

/* make sure N is correct */
assert (d - descriptors == N);

//seed();
}

__attribute__ ((destructor))
void caps_so_fini()
{
for (ulong i = 0; i < N; ++i)
Expand All @@ -134,6 +119,9 @@ void caps_so_fini()

/* /////////////////////////////////////////////////////////////////////// */

#ifdef _MSC_VER
__declspec(dllexport)
#endif
const LADSPA_Descriptor *
ladspa_descriptor (unsigned long i)
{
Expand All @@ -142,4 +130,10 @@ ladspa_descriptor (unsigned long i)
return 0;
}

struct CapsSoInit {
CapsSoInit() { caps_so_init(); }
~CapsSoInit() { caps_so_fini(); }
};
static CapsSoInit capsSoInit;

}; /* extern "C" */
2 changes: 1 addition & 1 deletion plugins/LadspaEffect/tap/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
FILE(GLOB PLUGIN_SOURCES tap-plugins/*.c)
LIST(SORT PLUGIN_SOURCES)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math")
FOREACH(_item ${PLUGIN_SOURCES})
GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE)
ADD_LIBRARY("${_plugin}" MODULE "${_item}")
Expand Down
2 changes: 1 addition & 1 deletion plugins/OpulenZ/adplug
Submodule adplug updated 721 files
Loading