Skip to content

Commit

Permalink
Upgrade Calf LADSPA plugins to 0.90 (#3987)
Browse files Browse the repository at this point in the history
Upgrade Calf LADSPA plugins to 0.90
  • Loading branch information
tresf authored Apr 16, 2018
1 parent 0850b78 commit ae0dd21
Show file tree
Hide file tree
Showing 11 changed files with 456 additions and 32 deletions.
1 change: 1 addition & 0 deletions include/LadspaBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ typedef enum BufferRates
typedef enum BufferData
{
TOGGLED,
ENUM,
INTEGER,
FLOATING,
TIME,
Expand Down
6 changes: 6 additions & 0 deletions include/LadspaManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ class EXPORT LadspaManager
be described as [-0.1, 3.1]. */
bool isInteger( const ladspa_key_t & _plugin, uint32_t _port );

/* Indicates that a user interface would probably wish to provide a
stepped control taking only integer values. This is equal to isInteger,
but the number of values is usually small and may be better depicted
with a combo box. */
bool isEnum( const ladspa_key_t & _plugin, uint32_t _port );

/* Returns the name of the port. */
QString getPortName( const ladspa_key_t & _plugin, uint32_t _port );

Expand Down
6 changes: 3 additions & 3 deletions plugins/LadspaEffect/LadspaControlDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ void LadspaControlDialog::updateEffectView( LadspaControls * _ctl )
{
if( (*it)->port()->proc == proc )
{
buffer_data_t this_port = (*it)->port()->data_type;
if( last_port != NONE &&
(*it)->port()->data_type == TOGGLED &&
!( (*it)->port()->data_type == TOGGLED &&
last_port == TOGGLED ) )
( this_port == TOGGLED || this_port == ENUM ) &&
( last_port != TOGGLED && last_port != ENUM ) )
{
++row;
col = 0;
Expand Down
6 changes: 5 additions & 1 deletion plugins/LadspaEffect/LadspaEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,11 @@ void LadspaEffect::pluginInstantiation()
}

p->scale = 1.0f;
if( manager->isPortToggled( m_key, port ) )
if( manager->isEnum( m_key, port ) )
{
p->data_type = ENUM;
}
else if( manager->isPortToggled( m_key, port ) )
{
p->data_type = TOGGLED;
}
Expand Down
9 changes: 7 additions & 2 deletions plugins/LadspaEffect/calf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Note:
# The last version of Calf that was LADSPA-capable is version 0.0.18.2

SET(CMAKE_CXX_STANDARD 11)

# Parse version info from autoconf
FILE(READ veal/configure.ac VERSION_FILE)
STRING(REPLACE "[" ";" VERSION_FILE ${VERSION_FILE} )
Expand All @@ -12,7 +14,7 @@ FILE(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/veal/src/*.cpp")
LIST(SORT SOURCES)

# Skip files matching pattern
SET(FILE_PATTERNS "ctl;gui;gtk;session;connector;jack;rdf;draw;fluid;preset;lv2;benchmark;win")
SET(FILE_PATTERNS "ctl;gui;gtk;session;connector;jack;rdf;draw;fluid;preset;lv2;benchmark;win;plugin.cpp")
FOREACH(_item ${SOURCES})
FOREACH(_pattern ${FILE_PATTERNS})
IF(${_item} MATCHES ${_pattern})
Expand All @@ -29,6 +31,10 @@ INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include"

INSTALL(TARGETS veal LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
SET_TARGET_PROPERTIES(veal PROPERTIES PREFIX "")

# Disable OSC messaging, it's not mingw compatible
TARGET_COMPILE_DEFINITIONS(veal PRIVATE DISABLE_OSC=1)

SET(INLINE_FLAGS "")
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
Expand All @@ -42,4 +48,3 @@ ENDIF()
IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
SET_TARGET_PROPERTIES(veal PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
ENDIF()

4 changes: 4 additions & 0 deletions plugins/LadspaEffect/calf/config.h.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#define VERSION "${VERSION}"
#define PACKAGE_NAME "veal"
#define USE_LADSPA 1
#define PKGLIBDIR ""

// Namespace change to avoid conflict with LV2
#define calf_plugins veal_plugins
2 changes: 1 addition & 1 deletion plugins/LadspaEffect/calf/veal
Submodule veal updated 1053 files
Loading

0 comments on commit ae0dd21

Please sign in to comment.