diff --git a/ChangeLog b/ChangeLog index d98550c8b..5c34567bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,83 @@ +2008-06-01 Tobias Doerffel + + * plugins/ladspa_effect/caps/basics.h: + * plugins/ladspa_effect/caps/interface.cc: + win32-build fixes + + * plugins/triple_oscillator/Makefile.am: + * plugins/triple_oscillator/triple_oscillator.cpp: + * plugins/audio_file_processor/audio_file_processor.cpp: + * plugins/audio_file_processor/Makefile.am: + made ready for building plugins as DLLs + + * plugins/kicker/kicker.h: + include QtCore/QObject rather than QObject + + * include/mmp.h: + * include/knob.h: + * include/track.h: + * include/engine.h: + * include/note.h: + * include/embed.h: + * include/instrument_view.h: + * include/config_mgr.h: + * include/automatable_model.h: + * include/mixer.h: + * include/instrument_track.h: + * include/instrument.h: + * include/sample_buffer.h: + * include/plugin.h: + * include/note_play_handle.h: + * include/song.h: + * include/string_pair_drag.h: + * include/oscillator.h: + * include/automatable_button.h: + * include/tooltip.h: + * include/journalling_object.h: + * include/pixmap_button.h: + * include/automatable_model_view.h: + * include/mv_base.h: + * include/volume_knob.h: + * include/plugin_view.h: + export according classes for making them accessibly by plugins + + * src/core/main.cpp: + dont set opacity for splashscreen + + * src/core/config_mgr.cpp: + customized paths for win32 (plugins in same directory as executable) + + * src/core/song.cpp: + initialize m_length member to 0 + + * src/core/plugin.cpp: + under win32 filter for DLL-files + + * include/types.h: + added macros for export-declaration + + * src/gui/plugin_browser.cpp: + * src/gui/effect_select_dialog.cpp: + * src/gui/main_window.cpp: + * src/core/track.cpp: + minor coding style issues + + * build_mingw32: + * acinclude.m4: + * Makefile.am: + better support for win32-builds + + * buildtools/bin2res.cpp: + open files in binary mode - fixes win32-build + + * configure.in: + * Makefile.am: + * include/audio_pulseaudio.h: + * src/core/audio/audio_pulseaudio.cpp: + * src/core/mixer.cpp: + * src/gui/setup_dialog.cpp: + added PulseAudio-support + 2008-06-01 Paul Giblock * src/tracks/pattern.cpp: @@ -7,7 +87,7 @@ Display floating text underneith the current track so you can actually see what you are doing -2008-05-27 Paul Giblock +2008-05-30 Paul Giblock * src/gui/piano_roll.cpp: - Improve selection of volume-bars on a chord. Select closest note diff --git a/Makefile.am b/Makefile.am index 2de6f5f09..7714e7346 100644 --- a/Makefile.am +++ b/Makefile.am @@ -138,9 +138,11 @@ lmms_UIC = \ ui_export_project.uic + BUILT_SOURCES = $(lmms_MOC) $(lmms_UIC) + lmms_EMBEDDED_RESOURCES = $(srcdir)/AUTHORS $(srcdir)/COPYING ./embedded_resources.h: $(lmms_EMBEDDED_RESOURCES) @@ -222,6 +224,7 @@ lmms_SOURCES = \ $(srcdir)/src/core/audio/audio_jack.cpp \ $(srcdir)/src/core/audio/audio_oss.cpp \ $(srcdir)/src/core/audio/audio_port.cpp \ + $(srcdir)/src/core/audio/audio_pulseaudio.cpp \ $(srcdir)/src/core/audio/audio_sample_recorder.cpp \ $(srcdir)/src/core/audio/audio_sdl.cpp \ $(srcdir)/src/core/midi/midi_alsa_raw.cpp \ @@ -307,6 +310,7 @@ lmms_SOURCES = \ $(srcdir)/include/audio_file_wave.h \ $(srcdir)/include/audio_jack.h \ $(srcdir)/include/audio_oss.h \ + $(srcdir)/include/audio_pulseaudio.h \ $(srcdir)/include/audio_sample_recorder.h \ $(srcdir)/include/audio_sdl.h \ $(srcdir)/include/automation_editor.h \ @@ -466,7 +470,7 @@ lmms_SOURCES = \ EXTRA_DIST = $(lmms_EMBEDDED_RESOURCES) lmms.1 -CLEANFILES = $(lmms_MOC) ./embedded_resources.h +CLEANFILES = $(lmms_MOC) ./embedded_resources.h liblmms-imp.a if HAVE_LIBSDL LIB_SDL_LDADD = -lSDL @@ -497,11 +501,20 @@ if HAVE_LIBSF LIB_SF_LDADD = -lsndfile endif -lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) +if HAVE_LIBPULSE +LIB_PA_LDADD = -lpulse +endif + +lmms_LDADD = $(QT_LDADD) $(LIB_SDL_LDADD) $(LIB_ASOUND_LDADD) $(LIB_JACK_LDADD) $(LIB_SDL_SOUND_LDADD) $(LIB_VORBIS_LDADD) $(LIB_SRC_LDADD) $(LIB_SF_LDADD) $(LIB_PA_LDADD) + if BUILD_LINUX lmms_LDFLAGS = -rdynamic endif +if BUILD_WIN32 +lmms_LDFLAGS = -Wl,-out-implib=liblmms-imp.a +endif + single-binary: $(CXX) $(CXXFLAGS) -DHAVE_CONFIG_H -combine -pipe -O2 -g $(INCLUDES) $(AM_CXXFLAGS) $(lmms_LDADD) $(lmms_LDFLAGS) $(lmms_SOURCES) -o lmms-single diff --git a/acinclude.m4 b/acinclude.m4 index db2170812..8487b891d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -4,7 +4,13 @@ AC_DEFUN([gw_CHECK_QT], AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PATH_X]) -AC_PATH_PROG([PKGCONFIG], [pkg-config]) +case "${prefix}" in + /opt/mingw*) + ;; + *) + AC_PATH_PROG([PKGCONFIG], [pkg-config]) + ;; +esac # Only search manually if no pkgconfig if test -z "$PKGCONFIG" ; then @@ -13,7 +19,7 @@ if test -z "$PKGCONFIG" ; then # Check that QTDIR is defined or that --with-qtdir given if test x"$QTDIR" = x ; then # some usual Qt-locations - QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.3.2 /usr/local/Trolltech/Qt-4.1.0" + QT_SEARCH="/usr /usr/lib/qt4 /usr/share/qt4 /usr/local/Trolltech/Qt-4.3.0 /usr/local/Trolltech/Qt-4.3.1 /usr/local/Trolltech/Qt-4.3.2 /usr/local/Trolltech/Qt-4.3.3 /usr/local/Trolltech/Qt-4.3.4" else QT_SEARCH=$QTDIR QTDIR="" @@ -155,7 +161,7 @@ if test -z "$QT_LIB" ; then if test "x$QT_LIBS" = x; then AC_MSG_ERROR([*** Couldn't find any Qt4 libraries]) fi - QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtXml4 -lQtNetwork4 -lQtGui4 -lws2_32" + QT_LIB="-L$QTDIR/bin -lQtCore4 -lQtXml4 -lQtNetwork4 -lQtGui4" # Check that windres is in path AC_PATH_PROGS([WINDRES],[i586-mingw32-windres windres],,[${prefix}/bin:$PATH]) if test x$WINDRES = x ; then diff --git a/build_mingw32 b/build_mingw32 new file mode 100755 index 000000000..3eb9b60e8 --- /dev/null +++ b/build_mingw32 @@ -0,0 +1,4 @@ +MINGW=/opt/mingw +export PATH=$PATH:$MINGW/bin +./configure --prefix=$MINGW --host=i586-mingw32 CC=$MINGW/bin/i586-mingw32-gcc CXX=$MINGW/bin/i586-mingw32-g++ DLLTOOL=$MINGW/bin/i586-mingw32-dlltool OBJDUMP=$MINGW/bin/i586-mingw32-objdump RANLIB=$MINGW/bin/i586-mingw32-ranlib AR=$MINGW/bin/i586-mingw32-ar AS=$MINGW/bin/i586-mingw32-as STRIP=$MINGW/bin/i586-mingw32-strip --with-qtdir=$MINGW --with-win32 CFLAGS="-mtune=generic -mmmx -fno-strict-aliasing" CXXFLAGS="-mtune=generic -mmmx -fno-strict-aliasing" +#./configure --prefix=$MINGW --host=i586-mingw32 --build=i586-mingw32 CC=$MINGW/bin/i586-mingw32-gcc CXX=$MINGW/bin/i586-mingw32-g++ --with-qtdir=$MINGW --with-win32 diff --git a/buildtools/bin2res.cpp b/buildtools/bin2res.cpp index add7b199d..1a597c8e7 100644 --- a/buildtools/bin2res.cpp +++ b/buildtools/bin2res.cpp @@ -65,7 +65,7 @@ int main( int argc, char * * argv ) } for( stringlist::iterator it = files.begin(); it != files.end(); ++it ) { - std::ifstream f( it->c_str() ); + std::ifstream f( it->c_str(), std::ios::binary ); if( f.fail() ) { std::cerr << "Cannot open file " << *it << diff --git a/configure.in b/configure.in index c82030ab9..a2603f675 100644 --- a/configure.in +++ b/configure.in @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) -AC_INIT(lmms, 0.4.0-svn20080530, lmms-devel/at/lists/dot/sf/dot/net) -AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080530) +AC_INIT(lmms, 0.4.0-svn20080601, lmms-devel/at/lists/dot/sf/dot/net) +AM_INIT_AUTOMAKE(lmms, 0.4.0-svn20080601) AM_CONFIG_HEADER(config.h) @@ -208,6 +208,22 @@ fi AM_CONDITIONAL(HAVE_LIBJACK, test ! -z "$HAVE_JACK_JACK_H") +# check for PulseAudio +AC_ARG_WITH(pulseaudio, + AS_HELP_STRING([--without-pulseaudio], + [disable support for PulseAudio-sound-output]), , + [ with_pulseaudio=yes ]) +AH_TEMPLATE(HAVE_PULSE_PULSEAUDIO_H, [Define to 1 if you have the header file.]) +if test "x$with_pulseaudio" = "xyes" ; then + AC_CHECK_HEADER(pulse/pulseaudio.h, HAVE_PULSE_PULSEAUDIO_H="true") + AC_CHECK_LIB([pulse], [pa_mainloop_new], HAVE_LIBPULSE="true", HAVE_PULSE_PULSEAUDIO_H="") +fi +if test ! -z "$HAVE_PULSE_PULSEAUDIO_H" ; then + AC_DEFINE(HAVE_PULSE_PULSEAUDIO_H) +fi +AM_CONDITIONAL(HAVE_LIBPULSE, test ! -z "$HAVE_PULSE_PULSEAUDIO_H") + + # check for proper WINE-installation and existing Steinberg headers AC_ARG_WITH(vst, AS_HELP_STRING([--without-vst], @@ -691,23 +707,6 @@ AC_CONFIG_FILES([Makefile plugins/singerbot/Makefile plugins/stk/Makefile plugins/stk/mallets/Makefile - plugins/stk/voices/Makefile - plugins/stk/voices/b3/Makefile - plugins/stk/voices/bandedwg/Makefile - plugins/stk/voices/blow_bottle/Makefile - plugins/stk/voices/blow_hole/Makefile - plugins/stk/voices/bowed/Makefile - plugins/stk/voices/brass/Makefile - plugins/stk/voices/clarinet/Makefile - plugins/stk/voices/flute/Makefile - plugins/stk/voices/fmvoices/Makefile - plugins/stk/voices/metal/Makefile - plugins/stk/voices/moog/Makefile - plugins/stk/voices/percflute/Makefile - plugins/stk/voices/resonate/Makefile - plugins/stk/voices/rhodey/Makefile - plugins/stk/voices/tubebell/Makefile - plugins/stk/voices/wurley/Makefile plugins/triple_oscillator/Makefile plugins/vestige/Makefile plugins/vibed/Makefile diff --git a/include/automatable_button.h b/include/automatable_button.h index 261c4f262..23300dce6 100644 --- a/include/automatable_button.h +++ b/include/automatable_button.h @@ -34,7 +34,7 @@ class automatableButtonGroup; -class automatableButton : public QPushButton, public boolModelView +class EXPORT automatableButton : public QPushButton, public boolModelView { Q_OBJECT public: @@ -78,7 +78,7 @@ private: -class automatableButtonGroup : public QWidget, public intModelView +class EXPORT automatableButtonGroup : public QWidget, public intModelView { Q_OBJECT public: diff --git a/include/automatable_model.h b/include/automatable_model.h index 3107e4262..f8022a24f 100644 --- a/include/automatable_model.h +++ b/include/automatable_model.h @@ -67,7 +67,7 @@ class track; -class automatableModel : public model, public journallingObject +class EXPORT automatableModel : public model, public journallingObject { Q_OBJECT public: diff --git a/include/automatable_model_view.h b/include/automatable_model_view.h index 1e35aa127..a94c245d9 100644 --- a/include/automatable_model_view.h +++ b/include/automatable_model_view.h @@ -34,7 +34,7 @@ class QMenu; -class automatableModelView : public modelView +class EXPORT automatableModelView : public modelView { public: automatableModelView( ::model * _model ) : @@ -94,7 +94,7 @@ protected: #define generateTypedModelView(type) \ -class type##ModelView : public automatableModelView \ +class EXPORT type##ModelView : public automatableModelView \ {\ public:\ type##ModelView( ::model * _model ) :\ diff --git a/include/config_mgr.h b/include/config_mgr.h index 8d799b428..4a63a3cf4 100644 --- a/include/config_mgr.h +++ b/include/config_mgr.h @@ -35,6 +35,8 @@ #include #include +#include "types.h" + class engine; @@ -47,7 +49,7 @@ const QString TRACK_ICON_PATH = "track_icons/"; const QString LOCALE_PATH = "locale/"; -class configManager +class EXPORT configManager { public: static inline configManager * inst( void ) diff --git a/include/embed.h b/include/embed.h index b18386c9a..91100b6b3 100644 --- a/include/embed.h +++ b/include/embed.h @@ -30,6 +30,9 @@ #include +#include "types.h" + + #define STRINGIFY_PLUGIN_NAME(s) STR(s) #define STR(PN) #PN @@ -45,8 +48,8 @@ struct descriptor } ; -QPixmap getIconPixmap( const char * _name, int _w = -1, int _h = -1 ); -QString getText( const char * _name ); +QPixmap EXPORT getIconPixmap( const char * _name, int _w = -1, int _h = -1 ); +QString EXPORT getText( const char * _name ); } diff --git a/include/engine.h b/include/engine.h index 14adb5632..d262c2c60 100644 --- a/include/engine.h +++ b/include/engine.h @@ -32,6 +32,8 @@ #include +#include "types.h" + class automationEditor; class bbEditor; class bbTrackContainer; @@ -49,7 +51,7 @@ class ladspa2LMMS; class controllerRackView; -class engine +class EXPORT engine { public: static void init( const bool _has_gui = true ); diff --git a/include/instrument.h b/include/instrument.h index 768c30a92..6bb9254eb 100644 --- a/include/instrument.h +++ b/include/instrument.h @@ -42,7 +42,7 @@ class notePlayHandle; class track; -class instrument : public plugin +class EXPORT instrument : public plugin { public: instrument( instrumentTrack * _instrument_track, diff --git a/include/instrument_track.h b/include/instrument_track.h index 669e2e6d8..c4ca6992c 100644 --- a/include/instrument_track.h +++ b/include/instrument_track.h @@ -61,7 +61,7 @@ class presetPreviewPlayHandle; class volumeKnob; -class instrumentTrack : public track, public midiEventProcessor +class EXPORT instrumentTrack : public track, public midiEventProcessor { Q_OBJECT mapPropertyFromModel(int,getVolume,setVolume,m_volumeModel); diff --git a/include/instrument_view.h b/include/instrument_view.h index 987c643d1..bdf716432 100644 --- a/include/instrument_view.h +++ b/include/instrument_view.h @@ -32,7 +32,7 @@ class instrumentTrackWindow; -class instrumentView : public pluginView +class EXPORT instrumentView : public pluginView { public: instrumentView( instrument * _instrument, QWidget * _parent ); diff --git a/include/journalling_object.h b/include/journalling_object.h index ced51b774..18676f37a 100644 --- a/include/journalling_object.h +++ b/include/journalling_object.h @@ -98,7 +98,7 @@ private: typedef QVector journalEntryVector; -class journallingObject +class EXPORT journallingObject { public: journallingObject( void ); diff --git a/include/knob.h b/include/knob.h index dbff099c8..32421e297 100644 --- a/include/knob.h +++ b/include/knob.h @@ -47,7 +47,7 @@ enum knobTypes -class knob : public QWidget, public floatModelView +class EXPORT knob : public QWidget, public floatModelView { Q_OBJECT Q_PROPERTY(float innerRadius READ innerRadius WRITE setInnerRadius) diff --git a/include/mixer.h b/include/mixer.h index 8fa9fd3eb..83eefc0a9 100644 --- a/include/mixer.h +++ b/include/mixer.h @@ -89,7 +89,7 @@ const Octaves BaseOctave = DefaultOctave; class mixerWorkerThread; -class mixer : public QObject +class EXPORT mixer : public QObject { Q_OBJECT public: diff --git a/include/mmp.h b/include/mmp.h index f082a7203..6674a0d4d 100644 --- a/include/mmp.h +++ b/include/mmp.h @@ -31,7 +31,7 @@ #include "types.h" -class multimediaProject : public QDomDocument +class EXPORT multimediaProject : public QDomDocument { public: enum ProjectTypes @@ -87,7 +87,7 @@ private: void upgrade( void ); - struct typeDescStruct + struct EXPORT typeDescStruct { ProjectTypes m_type; QString m_name; diff --git a/include/mv_base.h b/include/mv_base.h index 28e9db411..7c05fa2d1 100644 --- a/include/mv_base.h +++ b/include/mv_base.h @@ -28,10 +28,13 @@ #include +#include "types.h" + + class modelView; -class model : public QObject +class EXPORT model : public QObject { Q_OBJECT public: @@ -69,9 +72,8 @@ signals: -class modelView +class EXPORT modelView { - public: modelView( model * _model ); virtual ~modelView() diff --git a/include/note.h b/include/note.h index d06f2da34..f8000e310 100644 --- a/include/note.h +++ b/include/note.h @@ -83,7 +83,7 @@ const float MaxDetuning = 4 * 12.0f; -class note : public journallingObject +class EXPORT note : public journallingObject { public: note( const midiTime & _length = 0, diff --git a/include/note_play_handle.h b/include/note_play_handle.h index 9670a83e0..73748cae8 100644 --- a/include/note_play_handle.h +++ b/include/note_play_handle.h @@ -42,7 +42,7 @@ typedef QVector notePlayHandleVector; typedef QVector constNotePlayHandleVector; -class notePlayHandle : public playHandle, public note +class EXPORT notePlayHandle : public playHandle, public note { public: void * m_pluginData; diff --git a/include/oscillator.h b/include/oscillator.h index ad3a4c788..927d4ac11 100644 --- a/include/oscillator.h +++ b/include/oscillator.h @@ -41,7 +41,7 @@ #include "automatable_model.h" -class oscillator +class EXPORT oscillator { public: enum WaveShapes diff --git a/include/pixmap_button.h b/include/pixmap_button.h index 0f6c45689..2ff44212a 100644 --- a/include/pixmap_button.h +++ b/include/pixmap_button.h @@ -31,7 +31,7 @@ #include "automatable_button.h" -class pixmapButton : public automatableButton +class EXPORT pixmapButton : public automatableButton { Q_OBJECT public: diff --git a/include/plugin.h b/include/plugin.h index 870ec3661..d2dea90a0 100644 --- a/include/plugin.h +++ b/include/plugin.h @@ -43,7 +43,7 @@ class pixmapLoader; class pluginView; -class plugin : public journallingObject, public model +class EXPORT plugin : public journallingObject, public model { public: enum PluginTypes @@ -65,13 +65,13 @@ public: struct descriptor { const char * name; - const char * public_name; + const char * publicName; const char * description; const char * author; int version; PluginTypes type; const pixmapLoader * logo; - class subPluginFeatures + class EXPORT subPluginFeatures { public: struct key @@ -167,7 +167,7 @@ public: virtual inline QString publicName( void ) const { return( m_publicName != QString::null ? - m_publicName : m_descriptor->public_name ); + m_publicName : m_descriptor->publicName ); } virtual void setPublicName( const QString & _public_name ) @@ -189,17 +189,17 @@ public: // plugins can overload this for making other classes able to change // settings of the plugin without knowing the actual class - virtual void FASTCALL setParameter( const QString & _param, + virtual void setParameter( const QString & _param, const QString & _value ); // plugins can overload this for making other classes able to query // settings of the plugin without knowing the actual class - virtual QString FASTCALL getParameter( const QString & _param ); + virtual QString getParameter( const QString & _param ); // returns an instance of a plugin whose name matches to given one // if specified plugin couldn't be loaded, it creates a dummy-plugin - static plugin * FASTCALL instantiate( const QString & _plugin_name, + static plugin * instantiate( const QString & _plugin_name, model * _parent, void * _data ); @@ -217,7 +217,7 @@ public: virtual void waitForWorkerThread( void ); // fills given vector with descriptors of all available plugins - static void FASTCALL getDescriptorsOfAvailPlugins( + static void getDescriptorsOfAvailPlugins( QVector & _plugin_descs ); // create a view for the model diff --git a/include/plugin_view.h b/include/plugin_view.h index 21e1d251e..aeb794d52 100644 --- a/include/plugin_view.h +++ b/include/plugin_view.h @@ -31,7 +31,7 @@ #include "plugin.h" -class pluginView : public QWidget, public modelView +class EXPORT pluginView : public QWidget, public modelView { public: pluginView( plugin * _plugin, QWidget * _parent ) : diff --git a/include/sample_buffer.h b/include/sample_buffer.h index d7c67f41c..a265a8f04 100644 --- a/include/sample_buffer.h +++ b/include/sample_buffer.h @@ -49,11 +49,11 @@ class QPainter; -class sampleBuffer : public QObject, public sharedObject +class EXPORT sampleBuffer : public QObject, public sharedObject { Q_OBJECT public: - class handleState + class EXPORT handleState { public: handleState( bool _varying_pitch = FALSE ); diff --git a/include/song.h b/include/song.h index 1c9be2290..3c0a58905 100644 --- a/include/song.h +++ b/include/song.h @@ -46,7 +46,7 @@ const bpm_t MaxTempo = 999; const tick MaxSongLength = 9999 * DefaultTicksPerTact; -class song : public trackContainer +class EXPORT song : public trackContainer { Q_OBJECT mapPropertyFromModel(int,getTempo,setTempo,m_tempoModel); diff --git a/include/string_pair_drag.h b/include/string_pair_drag.h index c92f1a22a..d4bdb54b8 100644 --- a/include/string_pair_drag.h +++ b/include/string_pair_drag.h @@ -30,11 +30,12 @@ #include #include +#include "types.h" class QPixmap; -class stringPairDrag : public QDrag +class EXPORT stringPairDrag : public QDrag { public: stringPairDrag( const QString & _key, const QString & _value, diff --git a/include/tooltip.h b/include/tooltip.h index ad29ffb89..91a52c136 100644 --- a/include/tooltip.h +++ b/include/tooltip.h @@ -1,7 +1,7 @@ /* * tooltip.h - namespace toolTip, a tooltip-wrapper for LMMS * - * Copyright (c) 2005 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -28,14 +28,14 @@ #include +#include "types.h" + class QWidget; -namespace toolTip +struct toolTip { - - void add( QWidget * _w, const QString & _txt ); - + static void EXPORT add( QWidget * _w, const QString & _txt ); } ; diff --git a/include/track.h b/include/track.h index 3f7198dcd..9f2424298 100644 --- a/include/track.h +++ b/include/track.h @@ -338,7 +338,7 @@ private: // base-class for all tracks -class track : public model, public journallingObject +class EXPORT track : public model, public journallingObject { Q_OBJECT mapPropertyFromModel(bool,muted,setMuted,m_mutedModel); diff --git a/include/types.h b/include/types.h index ef816e8b8..6ac512bec 100644 --- a/include/types.h +++ b/include/types.h @@ -74,4 +74,25 @@ struct valueRanges } ; +#ifdef HAVE_CONFIG_H +#include +#endif + + +#ifdef BUILD_WIN32 + +#ifdef PLUGIN_NAME +#define EXPORT __declspec(dllimport) +#define PLUGIN_EXPORT __declspec(dllexport) +#else +#define EXPORT __declspec(dllexport) +#endif + +#else + +#define EXPORT +#define PLUGIN_EXPORT + +#endif + #endif diff --git a/include/volume_knob.h b/include/volume_knob.h index 35204b38a..94941865a 100644 --- a/include/volume_knob.h +++ b/include/volume_knob.h @@ -2,7 +2,7 @@ * volume_knob.h - defines a knob that display it's value as either a * percentage or in dBV. * - * Copyright (c) 2006-2007 Danny McRae + * Copyright (c) 2006-2008 Danny McRae * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -30,7 +30,7 @@ #include "knob.h" -class volumeKnob : public knob +class EXPORT volumeKnob : public knob { Q_OBJECT public: diff --git a/plugins/audio_file_processor/Makefile.am b/plugins/audio_file_processor/Makefile.am index 3f7377abe..e2d0aef28 100644 --- a/plugins/audio_file_processor/Makefile.am +++ b/plugins/audio_file_processor/Makefile.am @@ -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 diff --git a/plugins/audio_file_processor/audio_file_processor.cpp b/plugins/audio_file_processor/audio_file_processor.cpp index aeea79e26..f8043285a 100644 --- a/plugins/audio_file_processor/audio_file_processor.cpp +++ b/plugins/audio_file_processor/audio_file_processor.cpp @@ -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( _data ) ) ); diff --git a/plugins/kicker/kicker.h b/plugins/kicker/kicker.h index 174f98a6b..9773e9fb7 100644 --- a/plugins/kicker/kicker.h +++ b/plugins/kicker/kicker.h @@ -26,7 +26,7 @@ #ifndef _KICKER_H #define _KICKER_H -#include +#include #include "instrument.h" #include "instrument_view.h" #include "knob.h" diff --git a/plugins/ladspa_effect/caps/basics.h b/plugins/ladspa_effect/caps/basics.h index c10d9ba1d..bda3b345a 100644 --- a/plugins/ladspa_effect/caps/basics.h +++ b/plugins/ladspa_effect/caps/basics.h @@ -45,8 +45,17 @@ #include #include +#include -#include "ladspa.h" +#ifdef HAVE_CONFIG_H +#include +#endif + +#ifdef HAVE_LADSPA_H +#include +#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. */ diff --git a/plugins/ladspa_effect/caps/interface.cc b/plugins/ladspa_effect/caps/interface.cc index c0ef574fd..f660f7ba6 100644 --- a/plugins/ladspa_effect/caps/interface.cc +++ b/plugins/ladspa_effect/caps/interface.cc @@ -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" { diff --git a/plugins/triple_oscillator/Makefile.am b/plugins/triple_oscillator/Makefile.am index 77f9a54c2..a0c0d703d 100644 --- a/plugins/triple_oscillator/Makefile.am +++ b/plugins/triple_oscillator/Makefile.am @@ -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 diff --git a/plugins/triple_oscillator/triple_oscillator.cpp b/plugins/triple_oscillator/triple_oscillator.cpp index c44896e2b..6a2adb936 100644 --- a/plugins/triple_oscillator/triple_oscillator.cpp +++ b/plugins/triple_oscillator/triple_oscillator.cpp @@ -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( _data ) ) ); diff --git a/src/core/config_mgr.cpp b/src/core/config_mgr.cpp index e4be2d1b0..413e9ac9d 100644 --- a/src/core/config_mgr.cpp +++ b/src/core/config_mgr.cpp @@ -47,11 +47,19 @@ configManager * configManager::s_instanceOfMe = NULL; configManager::configManager( void ) : m_lmmsRcFile( QDir::home().absolutePath() + "/.lmmsrc.xml" ), m_workingDir( QDir::home().absolutePath() + "/lmms" ), - m_dataDir( qApp->applicationDirPath().section( '/', 0, -2 ) + - "/share/lmms/" ), + m_dataDir( qApp->applicationDirPath() +#ifndef BUILD_WIN32 + .section( '/', 0, -2 ) +#endif + + "/share/lmms/" ), m_artworkDir( defaultArtworkDir() ), - m_pluginDir( qApp->applicationDirPath().section( '/', 0, -2 ) + - "/lib/lmms/" ), + m_pluginDir( qApp->applicationDirPath() +#ifdef BUILD_WIN32 + + QDir::separator() +#else + .section( '/', 0, -2 ) + "/lib/lmms/" +#endif + ), m_vstDir( QDir::home().absolutePath() ), m_flDir( QDir::home().absolutePath() ) { diff --git a/src/core/main.cpp b/src/core/main.cpp index 47f0621b4..7ffc3af55 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -351,7 +351,6 @@ int main( int argc, char * * argv ) p.end(); QSplashScreen * ss = new QSplashScreen( pm ); - ss->setWindowOpacity( 0.85 ); ss->setMask( splash.alphaChannel().createMaskFromColor( QColor( 0, 0, 0 ) ) ); ss->show(); qApp->processEvents(); diff --git a/src/core/plugin.cpp b/src/core/plugin.cpp index f5fef24af..6293b4661 100644 --- a/src/core/plugin.cpp +++ b/src/core/plugin.cpp @@ -147,8 +147,13 @@ void plugin::waitForWorkerThread( void ) void plugin::getDescriptorsOfAvailPlugins( QVector & _plugin_descs ) { QDir directory( configManager::inst()->pluginDir() ); +#ifdef BUILD_WIN32 + QFileInfoList list = directory.entryInfoList( + QStringList( "*.dll" ) ); +#else QFileInfoList list = directory.entryInfoList( QStringList( "lib*.so" ) ); +#endif for( QFileInfoList::iterator file = list.begin(); file != list.end(); ++file ) { diff --git a/src/core/song.cpp b/src/core/song.cpp index 6926ac0e2..8fdd01b5d 100644 --- a/src/core/song.cpp +++ b/src/core/song.cpp @@ -91,6 +91,7 @@ song::song( void ) : m_paused( FALSE ), m_loadingProject( FALSE ), m_playMode( Mode_PlaySong ), + m_length( 0 ), m_trackToPlay( NULL ), m_patternToPlay( NULL ), m_loopPattern( FALSE ) diff --git a/src/core/track.cpp b/src/core/track.cpp index c8a6073e8..63b9e95d7 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -637,8 +637,8 @@ trackContentWidget::trackContentWidget( trackView * _parent ) : SIGNAL( positionChanged( const midiTime & ) ), this, SLOT( changePosition( const midiTime & ) ) ); - setAutoFillBackground(false); - setAttribute(Qt::WA_OpaquePaintEvent); + setAutoFillBackground( false ); + setAttribute( Qt::WA_OpaquePaintEvent ); } diff --git a/src/gui/effect_select_dialog.cpp b/src/gui/effect_select_dialog.cpp index 936fa4c6f..12f9cd8ba 100644 --- a/src/gui/effect_select_dialog.cpp +++ b/src/gui/effect_select_dialog.cpp @@ -175,7 +175,7 @@ effectListWidget::effectListWidget( QWidget * _parent ) : for( effectKeyList::const_iterator it = m_effectKeys.begin(); it != m_effectKeys.end(); ++it ) { - plugin_names += QString( ( *it ).desc->public_name ) + + plugin_names += QString( ( *it ).desc->publicName ) + ( ( ( *it ).desc->sub_plugin_features != NULL ) ? ": " + ( *it ).name : diff --git a/src/gui/main_window.cpp b/src/gui/main_window.cpp index 6cd217a50..eb4a1af65 100644 --- a/src/gui/main_window.cpp +++ b/src/gui/main_window.cpp @@ -399,7 +399,7 @@ void mainWindow::finalize( void ) if( it->type == plugin::Tool ) { m_toolsMenu->addAction( it->logo->pixmap(), - it->public_name ); + it->publicName ); m_tools.push_back( tool::instantiate( it->name, /*this*/NULL )->createView( this ) ); } diff --git a/src/gui/plugin_browser.cpp b/src/gui/plugin_browser.cpp index bd9043c64..e1aeb04a3 100644 --- a/src/gui/plugin_browser.cpp +++ b/src/gui/plugin_browser.cpp @@ -3,7 +3,7 @@ /* * plugin_browser.cpp - implementation of the plugin-browser * - * Copyright (c) 2005-2007 Tobias Doerffel + * Copyright (c) 2005-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -141,8 +141,7 @@ void pluginDescWidget::paintEvent( QPaintEvent * ) QFont f = pointSize<8>( p.font() ); f.setBold( TRUE ); p.setFont( f ); - p.drawText( 10 + logo_size.width(), 15, - m_pluginDescriptor.public_name ); + p.drawText( 10 + logo_size.width(), 15, m_pluginDescriptor.publicName ); if( height() > 24 || m_mouseOver ) {