made LMMS build for win32, coding-style fixes
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1038 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
PLUGIN_NAME = audiofileprocessor
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/gui -I.
|
||||
|
||||
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="audiofileprocessor"
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="$(PLUGIN_NAME)"
|
||||
|
||||
|
||||
%.moc: ./%.h
|
||||
@@ -13,7 +15,21 @@ AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="audiofileprocessor"
|
||||
|
||||
MOC_FILES = ./audio_file_processor.moc
|
||||
|
||||
BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h
|
||||
if BUILD_WIN32
|
||||
DLL=$(PLUGIN_NAME).dll
|
||||
|
||||
$(DLL): lib$(PLUGIN_NAME).la
|
||||
$(CXX) *.o -L$(top_srcdir) -llmms-imp -shared -Wl,-no-undefined -o $@ $(QT_LDADD)
|
||||
|
||||
install-exec-hook: $(DLL)
|
||||
$(STRIP) $<
|
||||
cp $< $(pkglibdir)
|
||||
rm $(pkglibdir)/lib$(PLUGIN_NAME).a $(pkglibdir)/lib$(PLUGIN_NAME).la
|
||||
else
|
||||
DLL=
|
||||
endif
|
||||
|
||||
BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h $(DLL)
|
||||
EMBEDDED_RESOURCES = $(wildcard *png)
|
||||
|
||||
./embedded_resources.h: $(EMBEDDED_RESOURCES)
|
||||
@@ -22,8 +38,7 @@ EMBEDDED_RESOURCES = $(wildcard *png)
|
||||
EXTRA_DIST = $(EMBEDDED_RESOURCES)
|
||||
|
||||
|
||||
CLEANFILES = $(MOC_FILES) ./embedded_resources.h
|
||||
|
||||
CLEANFILES = $(MOC_FILES) ./embedded_resources.h $(DLL)
|
||||
|
||||
|
||||
pkglib_LTLIBRARIES = libaudiofileprocessor.la
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor audiofileprocessor_plugin_descriptor =
|
||||
plugin::descriptor PLUGIN_EXPORT audiofileprocessor_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ),
|
||||
"AudioFileProcessor",
|
||||
@@ -608,7 +608,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model *, void * _data )
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
{
|
||||
return( new audioFileProcessor(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#ifndef _KICKER_H
|
||||
#define _KICKER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QtCore/QObject>
|
||||
#include "instrument.h"
|
||||
#include "instrument_view.h"
|
||||
#include "knob.h"
|
||||
|
||||
@@ -45,8 +45,17 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "ladspa.h"
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LADSPA_H
|
||||
#include <ladspa.h>
|
||||
#else
|
||||
#include "ladspa-1.1.h"
|
||||
#endif
|
||||
|
||||
#define BOUNDED (LADSPA_HINT_BOUNDED_BELOW | LADSPA_HINT_BOUNDED_ABOVE)
|
||||
#define INTEGER LADSPA_HINT_INTEGER
|
||||
@@ -76,14 +85,14 @@
|
||||
#define MIN_GAIN .000001 /* -120 dB */
|
||||
#define NOISE_FLOOR .00000000000005 /* -266 dB */
|
||||
|
||||
typedef __int8_t int8;
|
||||
typedef __uint8_t uint8;
|
||||
typedef __int16_t int16;
|
||||
typedef __uint16_t uint16;
|
||||
typedef __int32_t int32;
|
||||
typedef __uint32_t uint32;
|
||||
typedef __int64_t int64;
|
||||
typedef __uint64_t uint64;
|
||||
typedef int8_t int8;
|
||||
typedef uint8_t uint8;
|
||||
typedef int16_t int16;
|
||||
typedef uint16_t uint16;
|
||||
typedef int32_t int32;
|
||||
typedef uint32_t uint32;
|
||||
typedef int64_t int64;
|
||||
typedef uint64_t uint64;
|
||||
|
||||
typedef struct {
|
||||
char * name;
|
||||
@@ -137,7 +146,7 @@ T clamp (T value, T lower, T upper)
|
||||
static inline float
|
||||
frandom()
|
||||
{
|
||||
return (float) random() / (float) RAND_MAX;
|
||||
return (float) rand() / (float) RAND_MAX;
|
||||
}
|
||||
|
||||
/* for testing only. */
|
||||
|
||||
@@ -60,7 +60,7 @@ seed()
|
||||
static struct timeval tv;
|
||||
gettimeofday (&tv, 0);
|
||||
|
||||
srandom (tv.tv_sec ^ tv.tv_usec);
|
||||
srand (tv.tv_sec ^ tv.tv_usec);
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
AUTOMAKE_OPTIONS = foreign 1.4
|
||||
|
||||
PLUGIN_NAME = tripleoscillator
|
||||
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/src/gui -I.
|
||||
|
||||
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="tripleoscillator"
|
||||
AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="$(PLUGIN_NAME)"
|
||||
|
||||
|
||||
%.moc: ./%.h
|
||||
@@ -13,7 +15,20 @@ AM_CXXFLAGS := $(AM_CXXFLAGS) $(QT_CXXFLAGS) -DPLUGIN_NAME="tripleoscillator"
|
||||
|
||||
MOC_FILES = ./triple_oscillator.moc
|
||||
|
||||
BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h
|
||||
if BUILD_WIN32
|
||||
DLL=$(PLUGIN_NAME).dll
|
||||
|
||||
$(DLL): lib$(PLUGIN_NAME).la
|
||||
$(CXX) *.o -L$(top_srcdir) -llmms-imp -shared -Wl,-no-undefined -o $@ $(QT_LDADD) && $(STRIP) $@
|
||||
|
||||
install-exec-hook: $(DLL)
|
||||
cp $< $(pkglibdir)
|
||||
rm $(pkglibdir)/lib$(PLUGIN_NAME).a $(pkglibdir)/lib$(PLUGIN_NAME).la
|
||||
else
|
||||
DLL=
|
||||
endif
|
||||
|
||||
BUILT_SOURCES = $(MOC_FILES) ./embedded_resources.h $(DLL)
|
||||
EMBEDDED_RESOURCES = $(wildcard *png)
|
||||
|
||||
./embedded_resources.h: $(EMBEDDED_RESOURCES)
|
||||
@@ -22,11 +37,11 @@ EMBEDDED_RESOURCES = $(wildcard *png)
|
||||
EXTRA_DIST = $(EMBEDDED_RESOURCES)
|
||||
|
||||
|
||||
CLEANFILES = $(MOC_FILES) ./embedded_resources.h
|
||||
CLEANFILES = $(MOC_FILES) ./embedded_resources.h $(DLL)
|
||||
|
||||
|
||||
|
||||
pkglib_LTLIBRARIES= libtripleoscillator.la
|
||||
pkglib_LTLIBRARIES = libtripleoscillator.la
|
||||
|
||||
libtripleoscillator_la_SOURCES = triple_oscillator.cpp triple_oscillator.h
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
extern "C"
|
||||
{
|
||||
|
||||
plugin::descriptor tripleoscillator_plugin_descriptor =
|
||||
plugin::descriptor PLUGIN_EXPORT tripleoscillator_plugin_descriptor =
|
||||
{
|
||||
STRINGIFY_PLUGIN_NAME( PLUGIN_NAME ),
|
||||
"TripleOscillator",
|
||||
@@ -819,7 +819,7 @@ extern "C"
|
||||
{
|
||||
|
||||
// neccessary for getting instance out of shared lib
|
||||
plugin * lmms_plugin_main( model *, void * _data )
|
||||
plugin * PLUGIN_EXPORT lmms_plugin_main( model *, void * _data )
|
||||
{
|
||||
return( new tripleOscillator(
|
||||
static_cast<instrumentTrack *>( _data ) ) );
|
||||
|
||||
Reference in New Issue
Block a user