summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2007-09-22 15:15:06 +0000
committerWerner Schweer <ws.seh.de>2007-09-22 15:15:06 +0000
commit4b4783f00ad2978b6fcd9f4e421a8bdb0fef0bbf (patch)
tree81ac9e3a8e1689f664ac2bb1b339468a566f0708
parentda3f75d306f528caccefd738c7912dc09d4320d6 (diff)
updates
-rw-r--r--muse/CMakeLists.txt22
-rw-r--r--muse/ChangeLog2
-rw-r--r--muse/muse/driver/jack.cpp42
-rw-r--r--muse/muse/seqmsg.cpp3
-rw-r--r--muse/muse/wavetrack.cpp2
-rw-r--r--muse/synti/CMakeLists.txt2
-rw-r--r--muse/synti/organ/organ.cpp2
-rw-r--r--muse/synti/zynaddsubfx/CMakeLists.txt12
8 files changed, 57 insertions, 30 deletions
diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt
index d2c6a074..3c6269a8 100644
--- a/muse/CMakeLists.txt
+++ b/muse/CMakeLists.txt
@@ -126,18 +126,16 @@ endif (APPLE)
## fltk + fluid
if (ENABLE_ZYNADDSUBFX)
- find_path( FLTK_FLUID_EXECUTABLE fluid )
- find_path( FLTK_CONFIG_PATH fltk-config )
-# set (FLTK_LIBRARIES $FLTK_CONFIG_PATH)
-# FLTK_INCLUDE_DIR
-# FLTK_FOUND
-#
-# if (NOT FLTK_FOUND)
-# message(FATAL_ERROR "fltk toolkit not found, zynaddsubfx not build")
-# set(ENABLE_ZYNADDSUBFX OFF)
-# else (NOT FLTK_FOUND)
-# message("fltk toolkit found")
-# endif (NOT FLTK_FOUND)
+ set (FLTK_INCLUDE_DIR /usr/include)
+# SET(FLTK_FLUID_EXECUTABLE "/usr/bin/fluid")
+ include (FindFLTK)
+ if (NOT FLTK_FOUND)
+ message("fltk toolkit not found, zynaddsubfx not build")
+ set(ENABLE_ZYNADDSUBFX OFF)
+ else (NOT FLTK_FOUND)
+ message("fltk toolkit found")
+ endif (NOT FLTK_FOUND)
+
PKGCONFIG (mxml 2.0 MXML_INCDIR MXML_LIBDIR MXML_LIB MXML_CPP )
if (NOT MXML_INCDIR)
message("mxml >= 2.0 not found, zynaddsubfx not build")
diff --git a/muse/ChangeLog b/muse/ChangeLog
index e2746c9d..cf8a67a3 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,5 @@
+22.9. (ws)
+ - fixed wavetrack playback
17.9. (rj)
- changed to start/stop toggle without rewinding since this seems
like the popular choice (actually I have to agree)
diff --git a/muse/muse/driver/jack.cpp b/muse/muse/driver/jack.cpp
index 5480c35f..d5b1d752 100644
--- a/muse/muse/driver/jack.cpp
+++ b/muse/muse/driver/jack.cpp
@@ -51,6 +51,25 @@ static void jack_thread_init (void* /*data*/)
if (loadVST)
fst_adopt_thread();
#endif
+ int policy;
+ if ( (policy = sched_getscheduler (0)) < 0) {
+ printf("cannot get current client scheduler for JACK thread: %s!\n", strerror(errno));
+ }
+ else {
+ if (policy != SCHED_FIFO)
+ printf("JACK thread %d _NOT_ running SCHED_FIFO\n", getpid());
+ else if (debugMsg) {
+ struct sched_param rt_param;
+ memset(&rt_param, 0, sizeof(sched_param));
+ int type;
+ int rv = pthread_getschedparam(pthread_self(), &type, &rt_param);
+ if (rv == -1)
+ perror("get scheduler parameter");
+ printf("JACK thread running SCHED_FIFO priority %d\n",
+ rt_param.sched_priority);
+ }
+ }
+
}
//---------------------------------------------------------
@@ -197,9 +216,10 @@ static void noJackError(const char* /* s */)
// JackAudio
//---------------------------------------------------------
-JackAudio::JackAudio(jack_client_t* cl, char * name)
+JackAudio::JackAudio(jack_client_t* cl, char* name)
: AudioDriver()
{
+printf("JackAudio::JackAudio(%p,%s)\n", cl, name);
strcpy(jackRegisteredName, name);
_client = cl;
}
@@ -213,11 +233,13 @@ JackAudio::~JackAudio()
if (_client) {
if (jack_client_close(_client)) {
fprintf(stderr, "jack_client_close() failed: %s\n",
- strerror(errno));
+ strerror(errno));
}
}
- _client = 0;
+printf("JackAudio::~JackAudio\n");
+ _client = 0;
}
+
//---------------------------------------------------------
// getJackName()
//---------------------------------------------------------
@@ -233,6 +255,7 @@ char* JackAudio::getJackName()
bool JackAudio::restart()
{
+printf("JackAudio::restart\n");
_client = jack_client_new(jackRegisteredName);
if (!_client)
return true;
@@ -529,7 +552,8 @@ bool JackAudio::connect(Port src, Port dst)
const char* sn = jack_port_name(src.jackPort());
const char* dn = jack_port_name(dst.jackPort());
-// printf("jack connect <%s>%p - <%s>%p\n", sn, src, dn, dst);
+ if (debugMsg)
+ printf("jack connect <%s>%p - <%s>%p\n", sn, src.jackPort(), dn, dst.jackPort());
if (sn == 0 || dn == 0) {
fprintf(stderr, "JackAudio::connect(2): unknown jack ports\n");
@@ -563,7 +587,8 @@ bool JackAudio::disconnect(Port src, Port dst)
const char* sn = jack_port_name(src.jackPort());
const char* dn = jack_port_name(dst.jackPort());
-// printf("jack disconnect <%s>%p - <%s>%p\n", sn, src, dn, dst);
+ if (debugMsg)
+ printf("jack disconnect <%s>%p - <%s>%p\n", sn, src.jackPort(), dn, dst.jackPort());
if (sn == 0 || dn == 0) {
fprintf(stderr, "JackAudio::disconnect: unknown jack ports\n");
@@ -718,6 +743,10 @@ void JackAudio::seekTransport(unsigned frame)
Port JackAudio::findPort(const QString& name)
{
+ if (_client == 0) {
+ printf("JackAudio(%p)::findPort(%s): _client==0\n", this, qPrintable(name));
+ return Port();
+ }
jack_port_t* port = jack_port_by_name(_client, name.toLatin1().data());
// printf("Jack::findPort <%s>, %p\n", name.toLatin1().data(), port);
return (port == 0) ? Port() : Port(port);
@@ -777,6 +806,7 @@ bool initJackAudio()
printf("jack cannot access shared memory\n");
if (status & JackVersionError)
printf("jack server has wrong version\n");
+ printf("cannot create jack client\n");
return true;
}
@@ -787,7 +817,9 @@ bool initJackAudio()
if (debugMsg)
fprintf(stderr, "init Jack Audio: register device\n");
+printf("create jack, %p\n", client);
jackAudio = new JackAudio(client, jack_get_client_name(client));
+printf("create jack, client=%p jack=%p\n", client, jackAudio);
if (debugMsg)
fprintf(stderr, "init Jack Audio: register client\n");
jackAudio->registerClient();
diff --git a/muse/muse/seqmsg.cpp b/muse/muse/seqmsg.cpp
index d7f8ea0a..b330fe57 100644
--- a/muse/muse/seqmsg.cpp
+++ b/muse/muse/seqmsg.cpp
@@ -78,6 +78,8 @@ bool Audio::sendMessage(AudioMsg* m, bool doUndo)
// msgRoute
//---------------------------------------------------------
+extern bool mops;
+
void Audio::msgRoute(bool add, Route r)
{
if (add)
@@ -147,6 +149,7 @@ void Audio::msgAddRoute(Route r)
}
else if (r.dst.type == RouteNode::AUDIOPORT) {
AudioOutput* ao = (AudioOutput*)r.src.track;
+printf("msgAddRoute to AUDIPORT %p\n", ao);
audioDriver->connect(ao->jackPort(r.src.channel), r.dst.port);
}
else if (r.dst.type == RouteNode::MIDIPORT) {
diff --git a/muse/muse/wavetrack.cpp b/muse/muse/wavetrack.cpp
index 38df1158..e796c3f3 100644
--- a/muse/muse/wavetrack.cpp
+++ b/muse/muse/wavetrack.cpp
@@ -347,7 +347,7 @@ void WaveTrack::collectInputData()
else {
float** bpp = readBuffer[idx];
for (int i = 0; i < channels(); ++i)
- AL::dsp->cpy(buffer[i], bpp[i], sizeof(float));
+ AL::dsp->cpy(buffer[i], bpp[i], segmentSize);
}
}
}
diff --git a/muse/synti/CMakeLists.txt b/muse/synti/CMakeLists.txt
index 7e5274ac..e5145696 100644
--- a/muse/synti/CMakeLists.txt
+++ b/muse/synti/CMakeLists.txt
@@ -27,7 +27,7 @@ include_directories(
${PROJECT_SOURCE_DIR}/synti
)
-set (SubDirs libsynti s1 organ deicsonze simpledrums vam mus)
+set (SubDirs libsynti s1 organ deicsonze simpledrums vam mus two)
if (ENABLE_ZYNADDSUBFX)
set (SubDirs ${SubDirs} zynaddsubfx)
diff --git a/muse/synti/organ/organ.cpp b/muse/synti/organ/organ.cpp
index 2c94f384..7c83a463 100644
--- a/muse/synti/organ/organ.cpp
+++ b/muse/synti/organ/organ.cpp
@@ -133,7 +133,7 @@ Organ::Organ(int sr)
addController("percOn", PERC_ON, 0, 1, 1);
addController("percGain", PERC_GAIN, 0, 127, 60);
addController("percDecay", PERC_DECAY, 0, 127, 60);
- addController("percHarmony", PERC_HARMONY, 0, 8, 4);
+ addController("percHarmony", PERC_HARMONY, 0, 8, 3);
addController("rotaryOn", ROTARY_ON, 0, 1, 0);
addController("rot1Freq", ROT1_FREQ, 0, 127, 100);
addController("rot1Depth", ROT1_DEPTH, 0, 127, 50);
diff --git a/muse/synti/zynaddsubfx/CMakeLists.txt b/muse/synti/zynaddsubfx/CMakeLists.txt
index 199dd539..46d1d3df 100644
--- a/muse/synti/zynaddsubfx/CMakeLists.txt
+++ b/muse/synti/zynaddsubfx/CMakeLists.txt
@@ -18,14 +18,12 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
-SET(FLTK_FLUID_EXECUTABLE "/usr/bin/fluid")
-
include_directories(
BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/UI
BEFORE ${CMAKE_CURRENT_BINARY_DIR}
)
-FLTK_WRAP_UI ( fltk_ui
+FLTK_WRAP_UI ( FLTKUI
UI/ADnoteUI.fl
UI/BankUI.fl
UI/ConfigUI.fl
@@ -46,14 +44,8 @@ FLTK_WRAP_UI ( fltk_ui
UI/WidgetPDial.fl
)
-# ${fltk_ui_FLTK_UI_SRCS}
-# Output/JACKaudiooutput.C
-# Input/MidiIn.C
-# Input/ALSAMidiIn.C
-# Input/NULLMidiIn.C
-
add_library ( zynaddsubfx SHARED
- ${fltk_ui_FLTK_UI_SRCS}
+ ${FLTKUI_FLTK_UI_SRCS}
DSP/AnalogFilter.C
DSP/FFTwrapper.C
DSP/Filter.C