diff options
35 files changed, 195 insertions, 46 deletions
diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt index a5025368..095f309b 100644 --- a/muse/CMakeLists.txt +++ b/muse/CMakeLists.txt @@ -37,13 +37,25 @@ include ( ${PROJECT_SOURCE_DIR}/cmake/UsePkgConfig1.cmake ) option ( ENABLE_DSSI "enable Disposable Soft Synth Interface" ON) option ( ENABLE_VST "enable VST/win support" OFF) -option ( ENABLE_FLUID "enable fluidsynth softsynth plugins" OFF) +option ( ENABLE_FLUID "enable fluidsynth softsynth plugins" ON) # set(CMAKE_VERBOSE_MAKEFILE ON) set(QT_USE_QTXML TRUE) set(QT_USE_QTDESIGNER TRUE) ## +## Just print a notice if this is OS X +## +if (APPLE) + message("OS X detected.") +else (APPLE) + if (UNIX) + message("Unix (probably linux) detected") + endif(UNIX) + +endif (APPLE) + +## ## look for Qt4 ## @@ -76,10 +88,16 @@ endif (NOT TEXEXEC_PATH) ## alsa >= 0.9.0 ## +if (APPLE) + message("Disabling ALSA support due to OS X build.") +else (APPLE) PKGCONFIG (alsa 0.9.0 ALSA_INCDIR ALSA_LIBDIR ALSA_LIB ALSA_CPP ) if (NOT ALSA_INCDIR) message(FATAL_ERROR "Fatal error: ALSA >= 1.0.0 required") +else (NOT ALSA_INCDIR) + message("Alsa detected.") endif (NOT ALSA_INCDIR) +endif (APPLE) ## ## find sndfile >= 1.0.0 @@ -88,6 +106,8 @@ endif (NOT ALSA_INCDIR) PKGCONFIG (sndfile 1.0.0 SNDFILE_INCDIR SNDFILE_LIBDIR SNDFILE_LIB SNDFILE_CPP ) if (NOT SNDFILE_INCDIR) message(FATAL_ERROR "Fatal error: libsndfile >= 1.0.0 required") +else (NOT SNDFILE_INCDIR) + message("sndfile detected.") endif (NOT SNDFILE_INCDIR) ## @@ -97,6 +117,8 @@ endif (NOT SNDFILE_INCDIR) PKGCONFIG (samplerate 0.1.0 SAMPLERATE_INCDIR SAMPLERATE_LIBDIR SAMPLERATE_LIB SAMPLERATE_CPP ) if (NOT SAMPLERATE_INCDIR) message(FATAL_ERROR "Fatal error: libsamplerate >= 0.1.0 required") +else (NOT SAMPLERATE_INCDIR) + message("samplerate detected") endif (NOT SAMPLERATE_INCDIR) ## @@ -106,6 +128,8 @@ endif (NOT SAMPLERATE_INCDIR) PKGCONFIG (jack 0.98.0 JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP ) if (NOT JACK_INCDIR) message(FATAL_ERROR "Fatal error: JACK >= 0.98.0 required") +else (NOT JACK_INCDIR) + message("Jack detected") endif (NOT JACK_INCDIR) ## @@ -117,6 +141,8 @@ if ( ENABLE_DSSI ) if (NOT DSSI_INCDIR) message("Error: dssi >= 0.9.0 not found, disabling feature") set ( ENABLE_DSSI OFF ) + else (NOT DSSI_INCDIR) + message("DSSI detected.") endif (NOT DSSI_INCDIR) endif ( ENABLE_DSSI ) @@ -135,6 +161,8 @@ if ( ENABLE_FLUID ) if (NOT FLUID_INCDIR) message("Error: fluidsynth >= 0.9.0 not found, disabling feature") set ( ENABLE_FLUID OFF ) + else (NOT FLUID_INCDIR) + message("Fluidsynth detected") endif (NOT FLUID_INCDIR) endif ( ENABLE_FLUID ) diff --git a/muse/ChangeLog b/muse/ChangeLog index 63b55e7b..6e0692ea 100644 --- a/muse/ChangeLog +++ b/muse/ChangeLog @@ -1,3 +1,8 @@ +25.5 (rj) + * buckle up, bumpy road ahead + * partial support for MAC OS X + includes some build adjustments, more -fPIC and added + libraries, still builds on linux so I hope it's mostly ok. 20.5 (ws) * new controller select dialog * build libsynti.a with -fPIC for athlon64 systems diff --git a/muse/al/CMakeLists.txt b/muse/al/CMakeLists.txt index 15f83580..be8b83ba 100644 --- a/muse/al/CMakeLists.txt +++ b/muse/al/CMakeLists.txt @@ -7,7 +7,7 @@ add_library(al STATIC al.cpp marker.cpp pos.cpp sig.cpp tempo.cpp xml.cpp ) set_target_properties( al - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_SOURCE_DIR}/all.h" + PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_SOURCE_DIR}/all.h" ) add_dependencies(al ${PROJECT_SOURCE_DIR}/all.h.pch) @@ -22,11 +22,14 @@ #define __ALLQT_H__ #include <stdio.h> +#ifndef __APPLE__ #include <values.h> +#endif #include <errno.h> #include <stdarg.h> #include <unistd.h> #include <assert.h> +#include <poll.h> #include <cmath> #include <list> #include <vector> diff --git a/muse/awl/CMakeLists.txt b/muse/awl/CMakeLists.txt index df3cf551..3d8e1499 100644 --- a/muse/awl/CMakeLists.txt +++ b/muse/awl/CMakeLists.txt @@ -43,17 +43,26 @@ WRAP_CPP(mocCPP ${mocs}) QT4_WRAP_CPP (moc_headers ${mocH}) -set ( awl_src awl.cpp utils.cpp ${mocCPP} ${moc_headers} ) +set(awl_src + awl.cpp utils.cpp ${mocCPP} ${moc_headers} + ) add_library ( awl STATIC ${awl_src} ) set_target_properties( awl - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all.h" + PROPERTIES COMPILE_FLAGS "-fPIC -include ${PROJECT_BINARY_DIR}/all.h" ) -add_library ( awlplugin SHARED ${awl_src} awlplugin.cpp ) -set_target_properties( awlplugin - PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" - ) +IF (APPLE) + message("Not yet able to build awlplugin under OS X.") +ELSE (APPLE) + + add_library ( awlplugin SHARED ${awl_src} + awlplugin.cpp ) + set_target_properties( awlplugin + PROPERTIES COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" + ) + + install_targets ( /lib/${MusE_INSTALL_NAME}/designer/ awlplugin ) -install_targets ( /lib/${MusE_INSTALL_NAME}/designer/ awlplugin ) +ENDIF (APPLE) diff --git a/muse/awl/tcanvas.cpp b/muse/awl/tcanvas.cpp index 8b9a0925..8a9d5d0e 100644 --- a/muse/awl/tcanvas.cpp +++ b/muse/awl/tcanvas.cpp @@ -28,6 +28,10 @@ #include "metronom.xpm" #include "clock.xpm" +#ifdef __APPLE__ + inline double exp10(double a) { return pow(10.0, a); } +#endif + static QIcon* clockIcon; static QIcon* metronomIcon; @@ -94,7 +98,7 @@ TimeCanvas::TimeCanvas(TimeCanvasType t) // is known: pos1.setTick(0); - pos2.setTick(MAXINT); + pos2.setTick(INT_MAX); hmag = new QSlider(Qt::Horizontal); hmag->setRange(0, 100); @@ -112,7 +116,7 @@ TimeCanvas::TimeCanvas(TimeCanvasType t) _ymag = 1.0; hbar = new QScrollBar(Qt::Horizontal); - hbar->setRange(0, MAXINT); + hbar->setRange(0, INT_MAX); vbar = new QScrollBar(Qt::Vertical); timeTypeButton = new QToolButton; timeTypeButton->setFixedSize(20, rulerHeight); diff --git a/muse/midiplugins/filter/CMakeLists.txt b/muse/midiplugins/filter/CMakeLists.txt index b40e840f..420a6c00 100644 --- a/muse/midiplugins/filter/CMakeLists.txt +++ b/muse/midiplugins/filter/CMakeLists.txt @@ -32,7 +32,8 @@ add_library ( filter SHARED ) target_link_libraries( filter - midiplugin + midiplugin awl + ${QT_LIBRARIES} ) # - tell cmake to name target filter.so instead of diff --git a/muse/midiplugins/metronom/CMakeLists.txt b/muse/midiplugins/metronom/CMakeLists.txt index 0e699233..f423d99c 100644 --- a/muse/midiplugins/metronom/CMakeLists.txt +++ b/muse/midiplugins/metronom/CMakeLists.txt @@ -30,6 +30,7 @@ add_library ( metronom SHARED ) target_link_libraries( metronom midiplugin + ${QT_LIBRARIES} ) # - tell cmake to name target metronom.so instead of diff --git a/muse/midiplugins/transform/CMakeLists.txt b/muse/midiplugins/transform/CMakeLists.txt index c0ce11d4..826c721b 100644 --- a/muse/midiplugins/transform/CMakeLists.txt +++ b/muse/midiplugins/transform/CMakeLists.txt @@ -29,6 +29,7 @@ add_library ( transform SHARED target_link_libraries( transform midiplugin + ${QT_LIBRARIES} ) # - tell cmake to name target transform.so instead of diff --git a/muse/muse/driver/CMakeLists.txt b/muse/muse/driver/CMakeLists.txt index f75c9810..094ea1d3 100644 --- a/muse/muse/driver/CMakeLists.txt +++ b/muse/muse/driver/CMakeLists.txt @@ -3,10 +3,16 @@ # # +IF (APPLE) set ( driver_src - alsamidi.cpp jack.cpp dummyaudio.cpp alsatimer.cpp + jack.cpp dummyaudio.cpp coretimer.cpp coremidi.cpp + ) +ELSE (APPLE) +set ( driver_src + alsamidi.cpp jack.cpp dummyaudio.cpp alsatimer.cpp rtctimer.cpp posixtimer.cpp ) +ENDIF (APPLE) add_library ( driver STATIC ${driver_src} ) set_target_properties( driver diff --git a/muse/muse/driver/dummyaudio.cpp b/muse/muse/driver/dummyaudio.cpp index 54f4adfe..6b680ab9 100644 --- a/muse/muse/driver/dummyaudio.cpp +++ b/muse/muse/driver/dummyaudio.cpp @@ -187,29 +187,32 @@ std::list<PortName>* DummyAudio::inputPorts() static void* dummyLoop(void*) { +#ifndef __APPLE__ if (realTimePriority) { // // check if we really got realtime priviledges // - int policy; - if ((policy = sched_getscheduler (0)) < 0) { - printf("cannot get current client scheduler for audio dummy thread: %s!\n", strerror(errno)); - } - else { + int policy; + if ((policy = sched_getscheduler (0)) < 0) { + printf("cannot get current client scheduler for audio dummy thread: %s!\n", strerror(errno)); + } + else + { if (policy != SCHED_FIFO) printf("audio dummy thread _NOT_ running SCHED_FIFO\n"); - else if (debugMsg) { + else if (debugMsg) { struct sched_param rt_param; - memset(&rt_param, 0, sizeof(sched_param)); + memset(&rt_param, 0, sizeof(sched_param)); int type; - int rv = pthread_getschedparam(pthread_self(), &type, &rt_param); + int rv = pthread_getschedparam(pthread_self(), &type, &rt_param); if (rv == -1) perror("get scheduler parameter"); printf("audio dummy thread running SCHED_FIFO priority %d\n", rt_param.sched_priority); - } - } + } + } } +#endif for (;;) { if (audioState == AUDIO_RUNNING) diff --git a/muse/muse/dssihost.cpp b/muse/muse/dssihost.cpp index 7fbe5274..20a726fc 100644 --- a/muse/muse/dssihost.cpp +++ b/muse/muse/dssihost.cpp @@ -238,7 +238,11 @@ static void scanDSSIDir(const QString& s) if (debugMsg) printf("scan dssi plugin dir <%s>\n", s.toLatin1().data()); +#ifdef __APPLE__ + QDir pluginDir(s, QString("*.dylib"), QDir::Unsorted, QDir::Files); +#else QDir pluginDir(s, QString("*.so"), QDir::Unsorted, QDir::Files); +#endif if (!pluginDir.exists()) return; diff --git a/muse/muse/importmidi.cpp b/muse/muse/importmidi.cpp index 4fd5808d..b2d834fd 100644 --- a/muse/muse/importmidi.cpp +++ b/muse/muse/importmidi.cpp @@ -30,7 +30,7 @@ #include "al/tempo.h" #include "instruments/minstrument.h" #include "gconfig.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "part.h" //--------------------------------------------------------- @@ -330,8 +330,8 @@ void MusE::processTrack(MidiTrack* track) //--------------------------------------------------- // Parts ermitteln // die Midi-Spuren werden in Parts aufgebrochen; - // ein neuer Part wird bei einer Lücke von einem - // Takt gebildet; die Länge wird jeweils auf + // ein neuer Part wird bei einer Lcke von einem + // Takt gebildet; die L�ge wird jeweils auf // Takte aufgerundet und aligned //--------------------------------------------------- diff --git a/muse/muse/midi.cpp b/muse/muse/midi.cpp index 3dc4f5cf..eb94c04f 100644 --- a/muse/muse/midi.cpp +++ b/muse/muse/midi.cpp @@ -26,7 +26,7 @@ #include "midictrl.h" #include "midictrl.h" #include "audio.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "wave.h" #include "synth.h" #include "sync.h" diff --git a/muse/muse/midiedit/ecanvas.cpp b/muse/muse/midiedit/ecanvas.cpp index a33fa99f..ff3c1753 100644 --- a/muse/muse/midiedit/ecanvas.cpp +++ b/muse/muse/midiedit/ecanvas.cpp @@ -107,7 +107,7 @@ void EventCanvas::songChanged(int flags) { if ((flags & ~SC_SELECTION) && !editor->parts()->empty()) { items.clear(); - startTick = MAXINT; + startTick = INT_MAX; endTick = 0; for (iPart p = editor->parts()->begin(); p != editor->parts()->end(); ++p) { Part* part = p->second; @@ -1384,13 +1384,13 @@ QMimeData* EventCanvas::getTextDrag() //--------------------------------------------------- EventList el; - unsigned startTick = MAXINT; + unsigned startTick = INT_MAX; for (iCItem i = items.begin(); i != items.end(); ++i) { if (!i->second->isSelected()) continue; CItem* ne = i->second; Event e = ne->event; - if (startTick == MAXINT) + if (startTick == INT_MAX) startTick = e.tick(); el.add(e); } diff --git a/muse/muse/midiplugin.cpp b/muse/muse/midiplugin.cpp index 7f716a99..4787957a 100644 --- a/muse/muse/midiplugin.cpp +++ b/muse/muse/midiplugin.cpp @@ -224,7 +224,11 @@ static void loadMidiPluginDir(const QString& s) { if (debugMsg) printf("scan midi plugin dir <%s>\n", s.toLatin1().data()); +#ifdef __APPLE__ + QDir pluginDir(s, QString("*.dylib"), 0, QDir::Files); +#else QDir pluginDir(s, QString("*.so"), 0, QDir::Files); +#endif if (pluginDir.exists()) { QFileInfoList list = pluginDir.entryInfoList(); for (int i = 0; i < list.size(); ++i) { diff --git a/muse/muse/midiport.cpp b/muse/muse/midiport.cpp index 3cdb8958..a2382b65 100644 --- a/muse/muse/midiport.cpp +++ b/muse/muse/midiport.cpp @@ -25,7 +25,7 @@ #include "midi.h" #include "instruments/minstrument.h" #include "al/xml.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "audio.h" #include "midiedit/drummap.h" @@ -555,7 +555,7 @@ void MidiInPort::deactivate() //--------------------------------------------------------- // midiReceived //--------------------------------------------------------- - +#ifndef __APPLE__ void MidiInPort::eventReceived(snd_seq_event_t* ev) { MidiEvent event; @@ -641,6 +641,7 @@ void MidiInPort::eventReceived(snd_seq_event_t* ev) _recordEvents.add(*i); } } +#endif //--------------------------------------------------------- // afterProcess diff --git a/muse/muse/midiseq.cpp b/muse/muse/midiseq.cpp index fd79ff43..d1bcc114 100644 --- a/muse/muse/midiseq.cpp +++ b/muse/muse/midiseq.cpp @@ -23,9 +23,16 @@ #include "midiseq.h" #include "midictrl.h" #include "audio.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" + +#ifdef __APPLE__ +#include "driver/coretimer.h" +#else +#include "driver/rtctimer.h" #include "driver/posixtimer.h" #include "driver/alsatimer.h" +#endif + #include "sync.h" #include "song.h" #include "gconfig.h" @@ -327,7 +334,11 @@ void MidiSeq::threadStart(void*) perror("set realtime scheduler"); int policy; - if ((policy = sched_getscheduler (0)) < 0) { +#ifdef __APPLE__ + if (0) { +#else + if ( (policy = sched_getscheduler (0)) < 0) { +#endif printf("cannot get current client scheduler for midi thread: %s!\n", strerror(errno)); } else { @@ -346,6 +357,9 @@ void MidiSeq::threadStart(void*) } } +#ifdef __APPLE__ + timer = new CoreTimer; +#else // timer = new PosixTimer; // if (!timer->initTimer()) { // delete timer; @@ -359,6 +373,7 @@ void MidiSeq::threadStart(void*) } } // } +#endif initRealtimeTimer(); updatePollFd(); } diff --git a/muse/muse/midiseq.h b/muse/muse/midiseq.h index 48bec2c6..346aa8b4 100644 --- a/muse/muse/midiseq.h +++ b/muse/muse/midiseq.h @@ -23,8 +23,8 @@ #include "thread.h" #include "mpevent.h" -#include "driver/rtctimer.h" +#include "driver/timerdev.h" namespace AL { class Pos; }; diff --git a/muse/muse/mixer/mstrip.cpp b/muse/muse/mixer/mstrip.cpp index ef330b57..bebea036 100644 --- a/muse/muse/mixer/mstrip.cpp +++ b/muse/muse/mixer/mstrip.cpp @@ -13,7 +13,7 @@ #include "mixer.h" #include "widgets/simplebutton.h" #include "widgets/utils.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "synth.h" #include "midirack.h" #include "midiplugin.h" diff --git a/muse/muse/muse.cpp b/muse/muse/muse.cpp index 6340639e..398d456e 100644 --- a/muse/muse/muse.cpp +++ b/muse/muse/muse.cpp @@ -53,7 +53,11 @@ #include "awl/poslabel.h" #include "al/tempo.h" #include "shortcuts.h" +#ifdef __APPLE__ +#include "driver/coremidi.h" +#else #include "driver/alsamidi.h" +#endif #include "midiplugin.h" #include "midiedit/drummap.h" #include "widgets/utils.h" @@ -126,11 +130,12 @@ static RasterVal rasterTable[] = { static void* watchdog(void*) { int policy; +#ifndef __APPLE__ if ((policy = sched_getscheduler (0)) < 0) printf("Cannot get current client scheduler: %s\n", strerror(errno)); if (policy != SCHED_FIFO) printf("MusE: watchdog process _NOT_ running SCHED_FIFO\n"); - +#endif int fatal = 0; for (;;) { watchAudio = 0; @@ -523,6 +528,16 @@ MusE::MusE() initMidiInstruments(); +#ifdef __APPLE__ + if (coreMidi.init()) { + QMessageBox::critical(NULL, "MusE fatal error.", + "MusE failed to initialize the\n" + "Core midi subsystem, check\n" + "your configuration."); + fatalError("init core-midi failed"); + } + midiDriver = &coreMidi; +#else if (alsaMidi.init()) { QMessageBox::critical(NULL, "MusE fatal error.", "MusE failed to initialize the\n" @@ -531,7 +546,7 @@ MusE::MusE() fatalError("init alsa failed"); } midiDriver = &alsaMidi; - +#endif //----Actions fileOpenAction = new QAction(QIcon(*openIcon), tr("&Open"), this); @@ -2772,7 +2787,7 @@ int main(int argc, char* argv[]) gmDrumMap.initGm(); // init default drum map readConfiguration(); - QApplication::setFont(*config.fonts[0]); + QApplication::setFont(*config.fonts[0]); // SHOW MUSE SPLASH SCREEN if (config.showSplashScreen) { @@ -2787,6 +2802,7 @@ int main(int argc, char* argv[]) stimer->start(6000); } } + char c; QString opts("mvdDiosP:p"); @@ -3023,3 +3039,4 @@ int main(int argc, char* argv[]) fprintf(stderr, "app end %d\n", n); return n; } + diff --git a/muse/muse/plugin.cpp b/muse/muse/plugin.cpp index 45183f34..6ab03d18 100644 --- a/muse/muse/plugin.cpp +++ b/muse/muse/plugin.cpp @@ -174,7 +174,11 @@ static void loadPluginDir(const QString& s) { if (debugMsg) printf("scan ladspa plugin dir <%s>\n", s.toLatin1().data()); +#ifdef __APPLE__ + QDir pluginDir(s, QString("*.dylib"), 0, QDir::Files); +#else QDir pluginDir(s, QString("*.so"), 0, QDir::Files); +#endif if (pluginDir.exists()) { QFileInfoList list = pluginDir.entryInfoList(); for (int i = 0; i < list.size(); ++i) { diff --git a/muse/muse/preferences.cpp b/muse/muse/preferences.cpp index 7efd6751..59ab5173 100644 --- a/muse/muse/preferences.cpp +++ b/muse/muse/preferences.cpp @@ -34,7 +34,7 @@ #include "audio.h" #include "mixer/mixer.h" #include "midirc.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "instruments/minstrument.h" #include "midiedit/pianoroll.h" #include "midiedit/drumedit.h" diff --git a/muse/muse/route.cpp b/muse/muse/route.cpp index da5fb3af..40479bc3 100644 --- a/muse/muse/route.cpp +++ b/muse/muse/route.cpp @@ -24,7 +24,7 @@ #include "track.h" #include "synth.h" #include "driver/audiodev.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "al/xml.h" //--------------------------------------------------------- diff --git a/muse/muse/seqmsg.cpp b/muse/muse/seqmsg.cpp index 18dc7f5d..930ed13a 100644 --- a/muse/muse/seqmsg.cpp +++ b/muse/muse/seqmsg.cpp @@ -26,7 +26,7 @@ #include "al/sig.h" #include "audio.h" #include "driver/audiodev.h" -#include "driver/alsamidi.h" +#include "driver/mididev.h" #include "audio.h" #include "arranger/arranger.h" #include "plugin.h" diff --git a/muse/muse/synth.cpp b/muse/muse/synth.cpp index 06e798a0..b302e246 100644 --- a/muse/muse/synth.cpp +++ b/muse/muse/synth.cpp @@ -335,7 +335,11 @@ void initMidiSynth() { QString s = museGlobalLib + "/synthi"; +#ifdef __APPLE__ + QDir pluginDir(s, QString("*.dylib"), 0, QDir::Files); +#else QDir pluginDir(s, QString("*.so"), 0, QDir::Files); +#endif if (debugMsg) printf("searching for software synthesizer in <%s>\n", s.toLatin1().data()); if (pluginDir.exists()) { diff --git a/muse/muse/thread.cpp b/muse/muse/thread.cpp index 1acf2808..c77d8ab9 100644 --- a/muse/muse/thread.cpp +++ b/muse/muse/thread.cpp @@ -202,8 +202,11 @@ void Thread::loop() if (mlockall(MCL_CURRENT | MCL_FUTURE)) perror("WARNING: Cannot lock memory:"); } - +#ifdef __APPLE__ +#define BIG_ENOUGH_STACK (1024*256*1) +#else #define BIG_ENOUGH_STACK (1024*1024*1) +#endif char buf[BIG_ENOUGH_STACK]; for (int i = 0; i < BIG_ENOUGH_STACK; i++) buf[i] = i; @@ -213,10 +216,10 @@ void Thread::loop() pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0); int policy; - if ((policy = sched_getscheduler (0)) < 0) { + /*if ((policy = sched_getscheduler (0)) < 0) { printf("Thread: Cannot get current client scheduler: %s\n", strerror(errno)); } - +*/ if (debugMsg) printf("Thread <%s, id %p> has %s priority %d\n", _name, pthread_self(), policy == SCHED_FIFO ? "SCHED_FIFO" : "SCHED_OTHER", diff --git a/muse/muse/track.h b/muse/muse/track.h index 2bfef484..e00a71de 100644 --- a/muse/muse/track.h +++ b/muse/muse/track.h @@ -49,7 +49,10 @@ class MidiChannel; class PartList; class Part; +#ifndef __APPLE__ +// actually it should check for ALSA but I don't know how to do that typedef struct snd_seq_event snd_seq_event_t; +#endif static const int EVENT_FIFO_SIZE = 128; @@ -360,7 +363,9 @@ class MidiInPort : public MidiTrackBase { virtual Part* newPart(Part*, bool) { return 0; } Port port() const { return alsaPort; } +#ifndef __APPLE__ void eventReceived(snd_seq_event_t*); +#endif virtual void getEvents(unsigned from, unsigned to, int channel, MPEventList* dst); void afterProcess(); }; diff --git a/muse/plugins/freeverb/CMakeLists.txt b/muse/plugins/freeverb/CMakeLists.txt index 44a77ffa..5a0d57b0 100644 --- a/muse/plugins/freeverb/CMakeLists.txt +++ b/muse/plugins/freeverb/CMakeLists.txt @@ -29,4 +29,4 @@ set_target_properties (freeverb PROPERTIES PREFIX "" ) -install_files( /lib/${MusE_INSTALL_PATH}/plugins .so freeverb.so) +install_files( /lib/${MusE_INSTALL_PATH}/plugins freeverb) diff --git a/muse/synti/deicsonze/CMakeLists.txt b/muse/synti/deicsonze/CMakeLists.txt index 6edf37a2..25030154 100644 --- a/muse/synti/deicsonze/CMakeLists.txt +++ b/muse/synti/deicsonze/CMakeLists.txt @@ -40,5 +40,10 @@ set_target_properties ( deicsonze COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" ) +target_link_libraries(deicsonze + al awl synti + ${QT_LIBRARIES} + ) + install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ deicsonze ) diff --git a/muse/synti/fluid/CMakeLists.txt b/muse/synti/fluid/CMakeLists.txt index 9304564f..7723b507 100644 --- a/muse/synti/fluid/CMakeLists.txt +++ b/muse/synti/fluid/CMakeLists.txt @@ -40,6 +40,11 @@ set_target_properties ( fluid COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" LINK_FLAGS "-L${FLUID_LIBDIR} ${FLUID_LIB}" ) +target_link_libraries(fluid + synti + ${QT_LIBRARIES} + ${FLUID_LIB} + ) install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ fluid ) diff --git a/muse/synti/fluidsynth/CMakeLists.txt b/muse/synti/fluidsynth/CMakeLists.txt index 1dbe477f..9e9f619f 100644 --- a/muse/synti/fluidsynth/CMakeLists.txt +++ b/muse/synti/fluidsynth/CMakeLists.txt @@ -41,5 +41,11 @@ set_target_properties ( fluidsynth LINK_FLAGS "-L${FLUID_LIBDIR} ${FLUID_LIB}" ) +target_link_libraries(fluidsynth + synti + ${QT_LIBRARIES} + ${FLUID_LIB} + ) + install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ fluidsynth ) diff --git a/muse/synti/organ/CMakeLists.txt b/muse/synti/organ/CMakeLists.txt index 5be60520..d15eaa2d 100644 --- a/muse/synti/organ/CMakeLists.txt +++ b/muse/synti/organ/CMakeLists.txt @@ -40,5 +40,11 @@ set_target_properties ( organ COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" ) +target_link_libraries(organ + widgets + synti + ${QT_LIBRARIES} + ) + install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ organ ) diff --git a/muse/synti/s1/CMakeLists.txt b/muse/synti/s1/CMakeLists.txt index 83428204..0747980c 100644 --- a/muse/synti/s1/CMakeLists.txt +++ b/muse/synti/s1/CMakeLists.txt @@ -27,5 +27,8 @@ target_link_libraries( s1 synti ) # set_target_properties ( s1 PROPERTIES PREFIX "" ) +target_link_libraries(s1 + synti + ) install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ s1 ) diff --git a/muse/synti/vam/CMakeLists.txt b/muse/synti/vam/CMakeLists.txt index 2965d5d8..c4d4930d 100644 --- a/muse/synti/vam/CMakeLists.txt +++ b/muse/synti/vam/CMakeLists.txt @@ -40,5 +40,11 @@ set_target_properties ( vam COMPILE_FLAGS "-include ${PROJECT_BINARY_DIR}/all-pic.h" ) +target_link_libraries(vam + al + synti + ${QT_LIBRARIES} + ) + install_targets ( /lib/${MusE_INSTALL_NAME}/synthi/ vam ) |