zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 2ae144403154e23648d49e4cffaf277837217cd5
parent 3f1e87128362eb2ea25c2458ecf43af486aecf4c
Author: fundamental <mark.d.mccurry@gmail.com>
Date:   Tue, 22 Dec 2009 13:54:05 -0500

Nio: fixing misc bugs in Nio

Diffstat:
Msrc/CMakeLists.txt | 5+++--
Msrc/Input/NULLMidiIn.cpp | 2++
Msrc/Nio/CMakeLists.txt | 0
Msrc/Nio/OutMgr.cpp | 4++--
Msrc/Nio/OutMgr.h | 2+-
Msrc/Nio/PaEngine.cpp | 0
Msrc/Nio/PaEngine.h | 0
Msrc/UI/NioUI.cpp | 2+-
Msrc/main.cpp | 8+++-----
9 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt @@ -68,6 +68,7 @@ endif() if(AlsaEnable) list(APPEND AUDIO_LIBRARIES ${ASOUND_LIBRARY}) add_definitions(-DALSA=1) + add_definitions(-DALSAMIDIIN=1) #alsa midi TEMPORARY endif(AlsaEnable) if(JackEnable) @@ -117,11 +118,11 @@ if(CYGWIN) elseif(WINDOWS) add_definitions(-DOS_WINDOWS=1) set(OS_LIBRARIES "") -elseif(LINUX) +elseif(UNIX) add_definitions(-DOS_LINUX=1) set(OS_LIBRARIES "") else() - message(STATUS Error: building on unsupported OS) + message(STATUS "Error: building on unsupported OS") endif() diff --git a/src/Input/NULLMidiIn.cpp b/src/Input/NULLMidiIn.cpp @@ -21,6 +21,7 @@ */ #include "NULLMidiIn.h" +#include "../Misc/Util.h" NULLMidiIn::NULLMidiIn() {} @@ -37,5 +38,6 @@ void NULLMidiIn::getmidicmd(MidiCmdType &cmdtype, int *cmdparams) { cmdtype = MidiNull; + os_sleep(10000); } diff --git a/src/Nio/CMakeLists.txt b/src/Nio/CMakeLists.txt diff --git a/src/Nio/OutMgr.cpp b/src/Nio/OutMgr.cpp @@ -22,7 +22,7 @@ using namespace std; OutMgr *sysOut; OutMgr::OutMgr(Master *nmaster) - :running(false),numRequests(0) + :running(false),numRequests(2) { master = nmaster; @@ -210,7 +210,7 @@ void OutMgr::remove(AudioOut *out) pthread_mutex_unlock(&mutex); } -unsigned int OutMgr::getRunning() +int OutMgr::getRunning() { return numRequests(); } diff --git a/src/Nio/OutMgr.h b/src/Nio/OutMgr.h @@ -32,7 +32,7 @@ class OutMgr int requestSamples(unsigned int n=1); /**Return the number of building samples*/ - unsigned int getRunning(); + int getRunning(); void run(); diff --git a/src/Nio/PaEngine.cpp b/src/Nio/PaEngine.cpp diff --git a/src/Nio/PaEngine.h b/src/Nio/PaEngine.h diff --git a/src/UI/NioUI.cpp b/src/UI/NioUI.cpp @@ -9,7 +9,7 @@ NioUI::NioUI() :Fl_Window(200,100,400,400,"New IO Controls"), - groups(new Fl_Group*[5]), buttons(new Fl_Button*[4]) + groups(new Fl_Group*[5]), buttons(new Fl_Button*[5]) { groups[0]=NULL; groups[1]=NULL; diff --git a/src/main.cpp b/src/main.cpp @@ -238,13 +238,11 @@ void initprogram() master->swaplr = swaplr; -#ifdef ALSAMIDIIN +#if defined(ALSAMIDIIN) Midi = new ALSAMidiIn(); -#endif -#ifdef OSSMIDIIN +#elif defined(OSSMIDIIN) Midi = new OSSMidiIn(); -#endif -#if (defined(NONEMIDIIN) || (defined(VSTMIDIIN))||(!ALSAMIDIIN && !OSSMIDIIN)) +#else // defined(NONEMIDIIN) || (defined(VSTMIDIIN)) Midi = new NULLMidiIn(); #endif