@@ -1,4 +1,4 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
|
||||
|
||||
PROJECT(lmms)
|
||||
|
||||
@@ -12,6 +12,7 @@ IF(COMMAND CMAKE_POLICY)
|
||||
CMAKE_POLICY(SET CMP0045 NEW)
|
||||
CMAKE_POLICY(SET CMP0050 OLD)
|
||||
ENDIF()
|
||||
CMAKE_POLICY(SET CMP0020 NEW)
|
||||
ENDIF(COMMAND CMAKE_POLICY)
|
||||
|
||||
INCLUDE(CheckSubmodules)
|
||||
@@ -113,6 +114,7 @@ IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
SET(STATUS_STK "not built as requested")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
CHECK_INCLUDE_FILES(stdint.h LMMS_HAVE_STDINT_H)
|
||||
CHECK_INCLUDE_FILES(stdlib.h LMMS_HAVE_STDLIB_H)
|
||||
@@ -308,13 +310,13 @@ ENDIF(WANT_PORTAUDIO)
|
||||
IF(WANT_SOUNDIO)
|
||||
FIND_PACKAGE(SoundIo)
|
||||
IF(SOUNDIO_FOUND)
|
||||
SET(LMMS_HAVE_SOUNDIO TRUE)
|
||||
SET(STATUS_SOUNDIO "OK")
|
||||
INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}")
|
||||
SET(LMMS_HAVE_SOUNDIO TRUE)
|
||||
SET(STATUS_SOUNDIO "OK")
|
||||
INCLUDE_DIRECTORIES("${SOUNDIO_INCLUDE_DIR}")
|
||||
ELSE(SOUNDIO_FOUND)
|
||||
SET(SOUNDIO_INCLUDE_DIR "")
|
||||
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
|
||||
SET(SOUNDIO_LIBRARY "")
|
||||
SET(SOUNDIO_INCLUDE_DIR "")
|
||||
SET(STATUS_SOUNDIO "not found, please install libsoundio if you require libsoundio support")
|
||||
SET(SOUNDIO_LIBRARY "")
|
||||
ENDIF(SOUNDIO_FOUND)
|
||||
ENDIF(WANT_SOUNDIO)
|
||||
|
||||
@@ -490,32 +492,41 @@ ELSE()
|
||||
SET (STATUS_DEBUG_FPE "Disabled")
|
||||
ENDIF(WANT_DEBUG_FPE)
|
||||
|
||||
|
||||
# check for libsamplerate
|
||||
PKG_CHECK_MODULES(SAMPLERATE REQUIRED samplerate>=0.1.8)
|
||||
|
||||
# set compiler flags
|
||||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
|
||||
IF(${USE_WERROR})
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
|
||||
SET(WERROR_FLAGS "-Wall -Werror=unused-function -Wno-sign-compare -Wno-strict-overflow")
|
||||
OPTION(USE_WERROR "Add -werror to the build flags. Stops the build on warnings" OFF)
|
||||
IF(${USE_WERROR})
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Werror")
|
||||
ENDIF()
|
||||
|
||||
# Due to a regression in gcc-4.8.X, we need to disable array-bounds check
|
||||
IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32))
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds")
|
||||
ENDIF()
|
||||
ELSEIF(MSVC)
|
||||
# Remove any existing /W flags
|
||||
STRING(REGEX REPLACE "/W[0-4]" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
SET(WERROR_FLAGS "/W2")
|
||||
IF(${USE_WERROR})
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} /WX")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# Due to a regression in gcc-4.8.X, we need to disable array-bounds check
|
||||
IF (CMAKE_COMPILER_IS_GNUCXX AND ((CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.8.0") OR (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.8.0") OR LMMS_BUILD_WIN32))
|
||||
SET(WERROR_FLAGS "${WERROR_FLAGS} -Wno-array-bounds")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT CMAKE_BUILD_TYPE)
|
||||
message(STATUS "Setting build type to 'Release' as none was specified.")
|
||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
|
||||
# Set the possible values of build type for cmake-gui
|
||||
SET_PROPERTY(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release"
|
||||
"MinSizeRel" "RelWithDebInfo")
|
||||
"MinSizeRel" "RelWithDebInfo")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_C_FLAGS "${WERROR_FLAGS} ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "-fno-exceptions ${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${WERROR_FLAGS} ${CMAKE_CXX_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DLMMS_DEBUG")
|
||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DLMMS_DEBUG")
|
||||
|
||||
@@ -529,23 +540,25 @@ LIST(SORT LMMS_INCLUDES)
|
||||
# we somehow have to make LMMS-binary depend on MOC-files
|
||||
ADD_FILE_DEPENDENCIES("${CMAKE_BINARY_DIR}/lmmsconfig.h")
|
||||
|
||||
IF(WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
ELSE(WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
|
||||
ENDIF(WIN32)
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|AppleClang")
|
||||
IF(WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
|
||||
ELSE(WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DPIC")
|
||||
ENDIF(WIN32)
|
||||
ENDIF()
|
||||
|
||||
# use ccache
|
||||
OPTION(USE_CCACHE "Use ccache for compilation" OFF)
|
||||
IF(USE_CCACHE)
|
||||
FIND_PROGRAM(CCACHE ccache)
|
||||
IF (CCACHE)
|
||||
MESSAGE(STATUS "Using ccache found in PATH")
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
|
||||
ELSE()
|
||||
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
|
||||
ENDIF()
|
||||
FIND_PROGRAM(CCACHE ccache)
|
||||
IF (CCACHE)
|
||||
MESSAGE(STATUS "Using ccache found in PATH")
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
|
||||
SET_PROPERTY(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
|
||||
ELSE()
|
||||
MESSAGE(WARNING "USE_CCACHE enabled, but no ccache found")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# make sub-directories
|
||||
|
||||
@@ -74,10 +74,10 @@ MACRO(BUILD_PLUGIN PLUGIN_NAME)
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES LINK_FLAGS "-bundle_loader ${CMAKE_BINARY_DIR}/lmms")
|
||||
ADD_DEPENDENCIES(${PLUGIN_NAME} lmms)
|
||||
ENDIF(LMMS_BUILD_APPLE)
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
IF(LMMS_BUILD_WIN32 AND STRIP)
|
||||
SET_TARGET_PROPERTIES(${PLUGIN_NAME} PROPERTIES PREFIX "")
|
||||
ADD_CUSTOM_COMMAND(TARGET ${PLUGIN_NAME} POST_BUILD COMMAND ${STRIP} $<TARGET_FILE:${PLUGIN_NAME}>)
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
ENDIF()
|
||||
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${RCC_OUT} ${plugin_MOC_out}")
|
||||
ENDMACRO(BUILD_PLUGIN)
|
||||
|
||||
@@ -16,6 +16,10 @@ MESSAGE("PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}")
|
||||
SET(LMMS_HOST_X86 FALSE)
|
||||
SET(LMMS_HOST_X86_64 FALSE)
|
||||
|
||||
IF(MSVC)
|
||||
STRING(REGEX MATCH "86_64|amd64|AMD64" WIN64 "${CMAKE_SYSTEM_PROCESSOR}")
|
||||
ENDIF()
|
||||
|
||||
IF(WIN32)
|
||||
IF(WIN64)
|
||||
SET(IS_X86_64 TRUE)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "interpolation.h"
|
||||
#include "MemoryManager.h"
|
||||
|
||||
template<ch_cnt_t CHANNELS> class BasicFilters;
|
||||
template<ch_cnt_t CHANNELS=DEFAULT_CHANNELS> class BasicFilters;
|
||||
|
||||
template<ch_cnt_t CHANNELS>
|
||||
class LinkwitzRiley
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifndef CONTROLLER_H
|
||||
#define CONTROLLER_H
|
||||
|
||||
#include "export.h"
|
||||
#include "Engine.h"
|
||||
#include "Model.h"
|
||||
#include "JournallingObject.h"
|
||||
@@ -40,7 +41,7 @@ class ControllerConnection;
|
||||
typedef QVector<Controller *> ControllerVector;
|
||||
|
||||
|
||||
class Controller : public Model, public JournallingObject
|
||||
class EXPORT Controller : public Model, public JournallingObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
@@ -25,45 +25,21 @@
|
||||
#ifndef MICRO_TIMER
|
||||
#define MICRO_TIMER
|
||||
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifdef LMMS_HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#include <cstdlib>
|
||||
#include "lmms_basics.h"
|
||||
|
||||
#include <chrono>
|
||||
|
||||
class MicroTimer
|
||||
{
|
||||
using time_point = std::chrono::steady_clock::time_point;
|
||||
|
||||
public:
|
||||
inline MicroTimer()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
inline ~MicroTimer()
|
||||
{
|
||||
}
|
||||
|
||||
inline void reset()
|
||||
{
|
||||
gettimeofday( &begin, NULL );
|
||||
}
|
||||
|
||||
inline int elapsed() const
|
||||
{
|
||||
struct timeval now;
|
||||
gettimeofday( &now, NULL );
|
||||
return ( now.tv_sec - begin.tv_sec ) * 1000 * 1000 +
|
||||
( now.tv_usec - begin.tv_usec );
|
||||
}
|
||||
MicroTimer();
|
||||
~MicroTimer();
|
||||
|
||||
void reset();
|
||||
int elapsed() const;
|
||||
|
||||
private:
|
||||
struct timeval begin;
|
||||
|
||||
time_point begin;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include "lmms_basics.h"
|
||||
#include "MicroTimer.h"
|
||||
|
||||
class MixerProfiler
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#define NOTE_PLAY_HANDLE_H
|
||||
|
||||
#include "AtomicInt.h"
|
||||
#include "BasicFilters.h"
|
||||
#include "Note.h"
|
||||
#include "PlayHandle.h"
|
||||
#include "Track.h"
|
||||
@@ -36,7 +37,6 @@ class QReadWriteLock;
|
||||
class InstrumentTrack;
|
||||
class NotePlayHandle;
|
||||
|
||||
template<ch_cnt_t=DEFAULT_CHANNELS> class BasicFilters;
|
||||
typedef QList<NotePlayHandle *> NotePlayHandleList;
|
||||
typedef QList<const NotePlayHandle *> ConstNotePlayHandleList;
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMutex>
|
||||
|
||||
#include "export.h"
|
||||
|
||||
#include "MemoryManager.h"
|
||||
|
||||
#include "ThreadableJob.h"
|
||||
@@ -38,7 +40,7 @@ class QThread;
|
||||
class Track;
|
||||
class AudioPort;
|
||||
|
||||
class PlayHandle : public ThreadableJob
|
||||
class EXPORT PlayHandle : public ThreadableJob
|
||||
{
|
||||
public:
|
||||
enum Types
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
#include "MidiEvent.h"
|
||||
#include "VstSyncData.h"
|
||||
|
||||
#include <atomic>
|
||||
#include <vector>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
@@ -234,7 +235,7 @@ public:
|
||||
// recursive lock
|
||||
inline void lock()
|
||||
{
|
||||
if( !isInvalid() && __sync_add_and_fetch( &m_lockDepth, 1 ) == 1 )
|
||||
if( !isInvalid() && m_lockDepth.fetch_add( 1 ) == 0 )
|
||||
{
|
||||
m_dataSem.acquire();
|
||||
}
|
||||
@@ -243,7 +244,7 @@ public:
|
||||
// recursive unlock
|
||||
inline void unlock()
|
||||
{
|
||||
if( __sync_sub_and_fetch( &m_lockDepth, 1) <= 0 )
|
||||
if( m_lockDepth.fetch_sub( 1 ) <= 1 )
|
||||
{
|
||||
m_dataSem.release();
|
||||
}
|
||||
@@ -404,7 +405,7 @@ private:
|
||||
shmData * m_data;
|
||||
QSystemSemaphore m_dataSem;
|
||||
QSystemSemaphore m_messageSem;
|
||||
volatile int m_lockDepth;
|
||||
std::atomic_int m_lockDepth;
|
||||
|
||||
} ;
|
||||
#endif
|
||||
|
||||
@@ -174,6 +174,7 @@ private:
|
||||
TrackContainerView* m_trackContainerView;
|
||||
|
||||
} ;
|
||||
friend class TrackContainerView::scrollArea;
|
||||
|
||||
TrackContainer* m_tc;
|
||||
typedef QList<TrackView *> trackViewList;
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef EXPORT_H
|
||||
#define EXPORT_H
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifdef LMMS_HAVE_STDINT_H
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -56,9 +56,12 @@ typedef uint16_t fx_ch_t; // FX-channel (0 to MAX_EFFECT_CHANNEL)
|
||||
typedef uint32_t jo_id_t; // (unique) ID of a journalling object
|
||||
|
||||
// use for improved branch prediction
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
#define likely(x) Q_LIKELY(x)
|
||||
#define unlikely(x) Q_UNLIKELY(x)
|
||||
|
||||
// windows headers define "min" and "max" macros, breaking the methods bwloe
|
||||
#undef min
|
||||
#undef max
|
||||
|
||||
template<typename T>
|
||||
struct typeInfo
|
||||
@@ -93,7 +96,7 @@ struct typeInfo
|
||||
template<>
|
||||
inline float typeInfo<float>::minEps()
|
||||
{
|
||||
return 1.0e-10;
|
||||
return 1.0e-10f;
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
#include "lmms_basics.h"
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define GCC_VERSION "GCC " __VERSION__
|
||||
#define COMPILER_VERSION "GCC " __VERSION__
|
||||
#elif defined(_MSC_VER)
|
||||
#define COMPILER_VERSION "MSVC " STRINGIFY(_MSC_FULL_VER)
|
||||
#else
|
||||
#define GCC_VERSION "unknown compiler"
|
||||
#define COMPILER_VERSION "unknown compiler"
|
||||
#endif
|
||||
|
||||
#ifdef LMMS_HOST_X86
|
||||
|
||||
@@ -138,7 +138,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new AmplifierEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new BassBoosterEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new BitcrushEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
SET(CMAKE_DEBUG_POSTFIX "")
|
||||
|
||||
# Enable C++11
|
||||
ADD_DEFINITIONS(-std=c++0x)
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
@@ -86,6 +87,24 @@ IF("${PLUGIN_LIST}" STREQUAL "")
|
||||
|
||||
ENDIF("${PLUGIN_LIST}" STREQUAL "")
|
||||
|
||||
IF(MSVC)
|
||||
SET(MSVC_INCOMPATIBLE_PLUGINS
|
||||
LadspaEffect
|
||||
monstro
|
||||
organic
|
||||
ReverbSC
|
||||
sid
|
||||
vestige
|
||||
vibed
|
||||
vst_base
|
||||
VstEffect
|
||||
Xpressive
|
||||
zynaddsubfx
|
||||
)
|
||||
message(WARNING "Compiling with MSVC. The following plugins are not available: ${MSVC_INCOMPATIBLE_PLUGINS}")
|
||||
LIST(REMOVE_ITEM PLUGIN_LIST ${MSVC_INCOMPATIBLE_PLUGINS})
|
||||
ENDIF()
|
||||
|
||||
FOREACH(PLUGIN ${PLUGIN_LIST})
|
||||
ADD_SUBDIRECTORY(${PLUGIN})
|
||||
ENDFOREACH()
|
||||
|
||||
@@ -215,7 +215,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new CrossoverEQEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ extern "C"
|
||||
{
|
||||
|
||||
//needed for getting plugin out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new DelayEffect( parent , static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new DualFilterEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled1Model( true, this, tr( "Filter 1 enabled" ) ),
|
||||
m_filter1Model( this, tr( "Filter 1 type" ) ),
|
||||
m_cut1Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 1 frequency" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_res1Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 1" ) ),
|
||||
m_gain1Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 1" ) ),
|
||||
|
||||
m_mixModel( 0.0f, -1.0f, 1.0f, 0.01f, this, tr( "Mix" ) ),
|
||||
@@ -48,7 +48,7 @@ DualFilterControls::DualFilterControls( DualFilterEffect* effect ) :
|
||||
m_enabled2Model( true, this, tr( "Filter 2 enabled" ) ),
|
||||
m_filter2Model( this, tr( "Filter 2 type" ) ),
|
||||
m_cut2Model( 7000.0f, 1.0f, 20000.0f, 1.0f, this, tr( "Cutoff 2 frequency" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<0>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_res2Model( 0.5, BasicFilters<>::minQ(), 10.0, 0.01, this, tr( "Q/Resonance 2" ) ),
|
||||
m_gain2Model( 100.0f, 0.0f, 200.0f, 0.1f, this, tr( "Gain 2" ) )
|
||||
{
|
||||
m_filter1Model.addItem( tr( "LowPass" ), new PixmapLoader( "filter_lp" ) );
|
||||
|
||||
@@ -418,7 +418,7 @@ extern "C"
|
||||
{
|
||||
|
||||
//needed for getting plugin out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new EqEffect( parent , static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ extern "C"
|
||||
{
|
||||
|
||||
//needed for getting plugin out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new FlangerEffect( parent , static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -744,7 +744,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new FreeBoyInstrument(
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
|
||||
@@ -4,7 +4,7 @@ if(LMMS_HAVE_GIG)
|
||||
|
||||
# Disable C++11 on Clang until gig.h is patched
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
SET(CMAKE_CXX_STANDARD 98)
|
||||
ENDIF()
|
||||
|
||||
# Required for not crashing loading files with libgig
|
||||
|
||||
@@ -340,7 +340,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new HydrogenImport( QString::fromUtf8(
|
||||
static_cast<const char *>( _data ) ) );
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
# Disable C++11
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
# Enable C++11 for CXXFLAGS only and not for Windows
|
||||
IF(NOT LMMS_BUILD_WIN32)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
ENDIF()
|
||||
|
||||
BUILD_PLUGIN(ladspaeffect LadspaEffect.cpp LadspaControls.cpp LadspaControlDialog.cpp LadspaSubPluginFeatures.cpp LadspaEffect.h LadspaControls.h LadspaControlDialog.h LadspaSubPluginFeatures.h MOCFILES LadspaEffect.h LadspaControls.h LadspaControlDialog.h EMBEDDED_RESOURCES logo.png)
|
||||
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ladspa")
|
||||
|
||||
# Disable C++11
|
||||
SET(CMAKE_CXX_STANDARD 98)
|
||||
|
||||
IF(WANT_CAPS)
|
||||
ADD_SUBDIRECTORY(caps)
|
||||
ENDIF(WANT_CAPS)
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QMessageBox>
|
||||
|
||||
#include "LadspaEffect.h"
|
||||
@@ -141,12 +142,12 @@ bool LadspaEffect::processAudioBuffer( sampleFrame * _buf,
|
||||
|
||||
int frames = _frames;
|
||||
sampleFrame * o_buf = NULL;
|
||||
sampleFrame sBuf [_frames];
|
||||
QVarLengthArray<sample_t> sBuf(_frames * DEFAULT_CHANNELS);
|
||||
|
||||
if( m_maxSampleRate < Engine::mixer()->processingSampleRate() )
|
||||
{
|
||||
o_buf = _buf;
|
||||
_buf = &sBuf[0];
|
||||
_buf = reinterpret_cast<sampleFrame*>(sBuf.data());
|
||||
sampleDown( o_buf, _buf, m_maxSampleRate );
|
||||
frames = _frames * m_maxSampleRate /
|
||||
Engine::mixer()->processingSampleRate();
|
||||
@@ -593,7 +594,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new LadspaEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -347,7 +347,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new MidiExport();
|
||||
}
|
||||
|
||||
@@ -611,7 +611,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new MidiImport( QString::fromUtf8(
|
||||
static_cast<const char *>( _data ) ) );
|
||||
|
||||
@@ -164,7 +164,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new MultitapEchoEffect( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*/
|
||||
|
||||
#include <QDomElement>
|
||||
#include <QVarLengthArray>
|
||||
|
||||
#include "MultitapEchoControls.h"
|
||||
#include "MultitapEcho.h"
|
||||
@@ -102,7 +103,7 @@ void MultitapEchoControls::setDefaultAmpShape()
|
||||
{
|
||||
const int length = m_steps.value();
|
||||
|
||||
float samples [length];
|
||||
QVarLengthArray<float> samples(length);
|
||||
for( int i = 0; i < length; ++i )
|
||||
{
|
||||
samples[i] = 0.0f;
|
||||
@@ -116,7 +117,7 @@ void MultitapEchoControls::setDefaultLpShape()
|
||||
{
|
||||
const int length = m_steps.value();
|
||||
|
||||
float samples [length];
|
||||
QVarLengthArray<float> samples(length);
|
||||
for( int i = 0; i < length; ++i )
|
||||
{
|
||||
samples[i] = 3.0f;
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
# Enable C++11 for CXXFLAGS only
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
# Avoid unused warnings for mididata.h
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
|
||||
ENDIF()
|
||||
|
||||
INCLUDE_DIRECTORIES(adplug/src)
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Plugin::Descriptor PLUGIN_EXPORT opulenz_plugin_descriptor =
|
||||
};
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new OpulenzInstrument( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
# Enable C++11 for CXXFLAGS only
|
||||
# This is needed since this plugin uses C. Otherwise Travis fails
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
BUILD_PLUGIN(
|
||||
reverbsc
|
||||
ReverbSC.cpp
|
||||
|
||||
@@ -151,7 +151,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new ReverbSCEffect(
|
||||
parent,
|
||||
|
||||
@@ -163,7 +163,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model* parent, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model* parent, void* data )
|
||||
{
|
||||
return new SpectrumAnalyzer( parent, static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( data ) );
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new VstEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -11,12 +11,12 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_rtl_vecops")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WERROR_FLAGS} -fexceptions")
|
||||
|
||||
# See https://github.com/ArashPartow/exprtk/pull/9
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
EXECUTE_PROCESS(COMMAND patch exprtk/exprtk.hpp exprtk.hpp.patch
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_QUIET)
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
IF(LMMS_BUILD_WIN32 AND NOT MSVC)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features")
|
||||
ENDIF()
|
||||
|
||||
|
||||
@@ -1319,7 +1319,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new audioFileProcessor(
|
||||
static_cast<InstrumentTrack *>( _data ) );
|
||||
|
||||
@@ -582,7 +582,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new bitInvader( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new dynProcEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -367,7 +367,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new kickerInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ Plugin::Descriptor PLUGIN_EXPORT ladspabrowser_plugin_descriptor =
|
||||
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new ladspaBrowser;
|
||||
}
|
||||
|
||||
@@ -1041,7 +1041,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
|
||||
return( new lb302Synth(
|
||||
|
||||
@@ -1965,7 +1965,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new MonstroInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
@@ -917,7 +917,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new NesInstrument( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new organicInstrument( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ Plugin::Descriptor PLUGIN_EXPORT patman_plugin_descriptor =
|
||||
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new patmanInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return new PeakControllerEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>( _data ) );
|
||||
|
||||
@@ -1120,7 +1120,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model*, void* data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model*, void* data )
|
||||
{
|
||||
return new sfxrInstrument( static_cast<InstrumentTrack *>( data ) );
|
||||
}
|
||||
|
||||
@@ -822,7 +822,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new sidInstrument(
|
||||
static_cast<InstrumentTrack *>( _data ) ) );
|
||||
|
||||
@@ -163,7 +163,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new stereoEnhancerEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -113,7 +113,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new stereoMatrixEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -791,7 +791,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new TripleOscillator( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
@@ -1141,7 +1141,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return new vestigeInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
}
|
||||
|
||||
@@ -777,7 +777,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new vibed( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ ADD_CUSTOM_COMMAND(
|
||||
-L${WINE_LIBRARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp
|
||||
-ansi -mwindows -lpthread ${EXTRA_FLAGS} -fno-omit-frame-pointer
|
||||
-std=c++0x
|
||||
${WINE_BUILD_FLAGS}
|
||||
-o ../RemoteVstPlugin
|
||||
# Ensure correct file extension
|
||||
|
||||
@@ -1278,7 +1278,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
return( new WatsynInstrument( static_cast<InstrumentTrack *>( _data ) ) );
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model * _parent, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model * _parent, void * _data )
|
||||
{
|
||||
return( new waveShaperEffect( _parent,
|
||||
static_cast<const Plugin::Descriptor::SubPluginFeatures::Key *>(
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
# definitions for ZynAddSubFX
|
||||
IF(LMMS_BUILD_LINUX OR LMMS_BUILD_APPLE OR LMMS_BUILD_OPENBSD)
|
||||
@@ -24,9 +25,8 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wno-write-strings -Wno-deprecated-d
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
# link system-libraries
|
||||
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
|
||||
# fix X11 headers errors caused by bug with mingw + c++11
|
||||
REMOVE_DEFINITIONS(-std=c++0x)
|
||||
ADD_DEFINITIONS(-std=gnu++0x)
|
||||
# fix X11 headers errors caused by bug with mingw + c++11 (enable -std=gnu++0x)
|
||||
SET(CMAKE_CXX_EXTENSIONS ON)
|
||||
ENDIF(LMMS_BUILD_WIN32)
|
||||
|
||||
SET(FLTK_SKIP_OPENGL TRUE)
|
||||
|
||||
@@ -658,7 +658,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// necessary for getting instance out of shared lib
|
||||
Plugin * PLUGIN_EXPORT lmms_plugin_main( Model *, void * _data )
|
||||
PLUGIN_EXPORT Plugin * lmms_plugin_main( Model *, void * _data )
|
||||
{
|
||||
|
||||
return new ZynAddSubFxInstrument( static_cast<InstrumentTrack *>( _data ) );
|
||||
|
||||
@@ -10,7 +10,7 @@ SET(CMAKE_AUTOMOC ON)
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
|
||||
# Enable C++11
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
@@ -33,7 +33,9 @@ INCLUDE_DIRECTORIES(
|
||||
"${CMAKE_SOURCE_DIR}/include"
|
||||
)
|
||||
|
||||
IF(WIN32)
|
||||
IF(WIN32 AND MSVC)
|
||||
SET(WINRC "${CMAKE_BINARY_DIR}/lmms.rc")
|
||||
ELSEIF(WIN32)
|
||||
SET(WINRC "${CMAKE_BINARY_DIR}/lmmsrc.obj")
|
||||
ADD_CUSTOM_COMMAND(OUTPUT "${WINRC}"
|
||||
COMMAND "${WINDRES}"
|
||||
@@ -125,7 +127,7 @@ ENDIF()
|
||||
SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${LMMS_RCC_OUT} ${LMMS_UI_OUT} lmmsconfig.h lmms.1.gz")
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
SET(EXTRA_LIBRARIES "-lwinmm")
|
||||
SET(EXTRA_LIBRARIES "winmm")
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_BUILD_APPLE)
|
||||
|
||||
@@ -34,6 +34,7 @@ set(LMMS_SRCS
|
||||
core/MemoryHelper.cpp
|
||||
core/MemoryManager.cpp
|
||||
core/MeterModel.cpp
|
||||
core/MicroTimer.cpp
|
||||
core/Mixer.cpp
|
||||
core/MixerProfiler.cpp
|
||||
core/MixerWorkerThread.cpp
|
||||
|
||||
@@ -35,6 +35,11 @@
|
||||
#define powf pow
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
//not #if LMMS_BUILD_WIN32 because we have strncasecmp in mingw
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QtCore/QVarLengthArray>
|
||||
#include <QDomElement>
|
||||
|
||||
#include "InstrumentSoundShaping.h"
|
||||
@@ -153,8 +154,8 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer,
|
||||
|
||||
if( m_filterEnabledModel.value() )
|
||||
{
|
||||
float cutBuffer [frames];
|
||||
float resBuffer [frames];
|
||||
QVarLengthArray<float> cutBuffer(frames);
|
||||
QVarLengthArray<float> resBuffer(frames);
|
||||
|
||||
int old_filter_cut = 0;
|
||||
int old_filter_res = 0;
|
||||
@@ -167,11 +168,11 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer,
|
||||
|
||||
if( m_envLfoParameters[Cut]->isUsed() )
|
||||
{
|
||||
m_envLfoParameters[Cut]->fillLevel( cutBuffer, envTotalFrames, envReleaseBegin, frames );
|
||||
m_envLfoParameters[Cut]->fillLevel( cutBuffer.data(), envTotalFrames, envReleaseBegin, frames );
|
||||
}
|
||||
if( m_envLfoParameters[Resonance]->isUsed() )
|
||||
{
|
||||
m_envLfoParameters[Resonance]->fillLevel( resBuffer, envTotalFrames, envReleaseBegin, frames );
|
||||
m_envLfoParameters[Resonance]->fillLevel( resBuffer.data(), envTotalFrames, envReleaseBegin, frames );
|
||||
}
|
||||
|
||||
const float fcv = m_filterCutModel.value();
|
||||
@@ -246,8 +247,8 @@ void InstrumentSoundShaping::processAudioBuffer( sampleFrame* buffer,
|
||||
|
||||
if( m_envLfoParameters[Volume]->isUsed() )
|
||||
{
|
||||
float volBuffer [frames];
|
||||
m_envLfoParameters[Volume]->fillLevel( volBuffer, envTotalFrames, envReleaseBegin, frames );
|
||||
QVarLengthArray<float> volBuffer(frames);
|
||||
m_envLfoParameters[Volume]->fillLevel( volBuffer.data(), envTotalFrames, envReleaseBegin, frames );
|
||||
|
||||
for( fpp_t frame = 0; frame < frames; ++frame )
|
||||
{
|
||||
|
||||
@@ -25,10 +25,12 @@
|
||||
#include "LocklessAllocator.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <strings.h>
|
||||
|
||||
#include "lmmsconfig.h"
|
||||
|
||||
#ifndef LMMS_BUILD_WIN32
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
static const size_t SIZEOF_SET = sizeof( int ) * 8;
|
||||
|
||||
|
||||
27
src/core/MicroTimer.cpp
Normal file
27
src/core/MicroTimer.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "MicroTimer.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace std::chrono;
|
||||
|
||||
static_assert(ratio_less_equal<steady_clock::duration::period, micro>::value,
|
||||
"MicroTimer: steady_clock doesn't support microsecond resolution");
|
||||
|
||||
MicroTimer::MicroTimer()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
MicroTimer::~MicroTimer()
|
||||
{
|
||||
}
|
||||
|
||||
void MicroTimer::reset()
|
||||
{
|
||||
begin = steady_clock::now();
|
||||
}
|
||||
|
||||
int MicroTimer::elapsed() const
|
||||
{
|
||||
auto now = steady_clock::now();
|
||||
return std::chrono::duration_cast<std::chrono::duration<int, std::micro>>(now - begin).count();
|
||||
}
|
||||
@@ -64,7 +64,7 @@
|
||||
typedef LocklessList<PlayHandle *>::Element LocklessListElement;
|
||||
|
||||
|
||||
static __thread bool s_renderingThread;
|
||||
static thread_local bool s_renderingThread;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -34,8 +34,6 @@ MixerWorkerThread::JobQueue MixerWorkerThread::globalJobQueue;
|
||||
QWaitCondition * MixerWorkerThread::queueReadyWaitCond = NULL;
|
||||
QList<MixerWorkerThread *> MixerWorkerThread::workerThreads;
|
||||
|
||||
|
||||
|
||||
// implementation of internal JobQueue
|
||||
void MixerWorkerThread::JobQueue::reset( OperationMode _opMode )
|
||||
{
|
||||
@@ -89,7 +87,7 @@ void MixerWorkerThread::JobQueue::wait()
|
||||
while( (int) m_itemsDone < (int) m_queueSize )
|
||||
{
|
||||
#if defined(LMMS_HOST_X86) || defined(LMMS_HOST_X86_64)
|
||||
asm( "pause" );
|
||||
_mm_pause();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ void printVersion( char *executableName )
|
||||
"License as published by the Free Software Foundation; either\n"
|
||||
"version 2 of the License, or (at your option) any later version.\n\n"
|
||||
"Try \"%s --help\" for more information.\n\n", LMMS_VERSION,
|
||||
PLATFORM, MACHINE, QT_VERSION_STR, GCC_VERSION,
|
||||
PLATFORM, MACHINE, QT_VERSION_STR, COMPILER_VERSION,
|
||||
LMMS_PROJECT_COPYRIGHT, executableName );
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ AboutDialog::AboutDialog(QWidget* parent) :
|
||||
arg( PLATFORM ).
|
||||
arg( MACHINE ).
|
||||
arg( QT_VERSION_STR ).
|
||||
arg( GCC_VERSION ) );
|
||||
arg( COMPILER_VERSION ) );
|
||||
versionLabel->setTextInteractionFlags(
|
||||
versionLabel->textInteractionFlags() |
|
||||
Qt::TextSelectableByMouse );
|
||||
|
||||
@@ -98,7 +98,7 @@ bool VersionedSaveDialog::changeFileNameVersion(QString &fileName, bool incremen
|
||||
Q_ASSERT( ok );
|
||||
|
||||
// Can't decrement 0
|
||||
if ( !increment and version == 0 )
|
||||
if ( !increment && version == 0 )
|
||||
return false;
|
||||
// Replace version number
|
||||
version = increment ? version + 1 : version - 1;
|
||||
|
||||
@@ -8,7 +8,7 @@ INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
|
||||
INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++0x")
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
SET(CMAKE_AUTOMOC ON)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user