summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner Schweer <ws.seh.de>2007-10-09 09:59:07 +0000
committerWerner Schweer <ws.seh.de>2007-10-09 09:59:07 +0000
commit06c20e05c194e165cfd75c2d9d24fe9a0be15c01 (patch)
treecf6bb31ddefd7d073edfaf430e0d12689c57bfba
parent673ea3f4d3aa97003acfc5ee94c38431fd026062 (diff)
updates
-rwxr-xr-xMakefile14
-rw-r--r--muse/CMakeLists.txt13
-rw-r--r--muse/ChangeLog6
-rw-r--r--muse/config.h.in2
-rw-r--r--muse/doc/dimpl/CMakeLists.txt15
-rw-r--r--muse/doc/man/de/CMakeLists.txt17
-rw-r--r--muse/doc/man/en/CMakeLists.txt19
-rw-r--r--muse/muse/driver/jack.cpp21
-rw-r--r--muse/synti/mus/mus.cpp16
9 files changed, 93 insertions, 30 deletions
diff --git a/Makefile b/Makefile
index aa776560..2efc7f23 100755
--- a/Makefile
+++ b/Makefile
@@ -63,3 +63,17 @@ package:
mv build/muse-*.sh .
+# build muse/doc/man/de/man-de.pdf
+# and muse/doc/man/en/man-en.pdf
+manual:
+ cd build; make manual
+
+# build muse/doc/dimple/dimpl.pdf
+program_doc:
+ cd build; make program_doc
+
+# build doxygen program documentation
+doxy:
+ cd build; make doxy
+
+
diff --git a/muse/CMakeLists.txt b/muse/CMakeLists.txt
index 2d8a196d..aa3ab312 100644
--- a/muse/CMakeLists.txt
+++ b/muse/CMakeLists.txt
@@ -173,11 +173,18 @@ endif (NOT SAMPLERATE_INCDIR)
## find jack >= 0.103.0
##
-PKGCONFIG (jack 0.103.0 JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP )
+PKGCONFIG (jack 0.107.0 JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP )
if (NOT JACK_INCDIR)
- message(FATAL_ERROR "Fatal error: JACK >= 0.103.0 required")
+ PKGCONFIG (jack 0.103.0 JACK_INCDIR JACK_LIBDIR JACK_LIB JACK_CPP )
+ if (NOT JACK_INCDIR)
+ message(FATAL_ERROR "Fatal error: JACK >= 0.103 required")
+ else (NOT JACK_INCDIR)
+ message("Jack 0.103 detected")
+ set(JACK103 ON)
+ endif (NOT JACK_INCDIR)
else (NOT JACK_INCDIR)
- message("Jack detected")
+ message("Jack 0.107 detected")
+ set(JACK107 ON)
endif (NOT JACK_INCDIR)
##
diff --git a/muse/ChangeLog b/muse/ChangeLog
index cf8a67a3..3555d4ef 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,9 @@
+9.10. (ws)
+ - extend cmake scripts to automatically distinguish between jackd 0.103.0
+ as distributed with (k)ubuntu and current jackd 0.107.0
+ - fixes for texexec
+ - do not automatically build documentation; new make targets "program_doc" and
+ "manual"
22.9. (ws)
- fixed wavetrack playback
17.9. (rj)
diff --git a/muse/config.h.in b/muse/config.h.in
index 5ac51f8a..7a856aa5 100644
--- a/muse/config.h.in
+++ b/muse/config.h.in
@@ -21,6 +21,8 @@
#cmakedefine DSSI_SUPPORT
#cmakedefine VST_SUPPORT
#cmakedefine USE_SSE
+#cmakedefine JACK103
+#cmakedefine JACK107
#define INSTALL_NAME "${MusE_INSTALL_NAME}"
#define INSTPREFIX "${CMAKE_INSTALL_PREFIX}"
diff --git a/muse/doc/dimpl/CMakeLists.txt b/muse/doc/dimpl/CMakeLists.txt
index bcec6eb9..ab88e87c 100644
--- a/muse/doc/dimpl/CMakeLists.txt
+++ b/muse/doc/dimpl/CMakeLists.txt
@@ -20,22 +20,21 @@
set (SRC dimpl.tex)
-add_custom_command (
+add_custom_command (
OUTPUT dimpl.pdf
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dimpl.tex
- COMMAND ${TEXEXEC_PATH}/texexec
+ COMMAND ${TEXEXEC_PATH}/texexec
ARGS --language=en --verbose --batch --pdf
- --path=${CMAKE_CURRENT_SOURCE_DIR}
- --result=dimpl.pdf
- dimpl.tex
+ --result=dimpl.pdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/dimpl.tex
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-add_custom_target ( dimpl ALL
- DEPENDS dimpl.pdf
+add_custom_target ( program_doc
+ DEPENDS dimpl.pdf
)
-install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
+install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
${CMAKE_CURRENT_BINARY_DIR}/dimpl.pdf )
set (extraClean dimpl.log dimpl.tmp dimpl.tuo dimpl.tui
diff --git a/muse/doc/man/de/CMakeLists.txt b/muse/doc/man/de/CMakeLists.txt
index 9dc7eb8f..0c70dd3b 100644
--- a/muse/doc/man/de/CMakeLists.txt
+++ b/muse/doc/man/de/CMakeLists.txt
@@ -18,9 +18,9 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
-add_custom_command (
+add_custom_command (
OUTPUT man-de.pdf
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/man-de.tex
${CMAKE_CURRENT_SOURCE_DIR}/projekte.tex
${CMAKE_CURRENT_SOURCE_DIR}/miditracks.tex
@@ -28,19 +28,18 @@ add_custom_command (
${CMAKE_CURRENT_SOURCE_DIR}/midirecording.tex
${CMAKE_CURRENT_SOURCE_DIR}/installation.tex
${CMAKE_CURRENT_SOURCE_DIR}/automation.tex
- COMMAND ${TEXEXEC_PATH}/texexec
+ COMMAND ${TEXEXEC_PATH}/texexec
ARGS --language=en --verbose --batch --pdf
- --path=${CMAKE_CURRENT_SOURCE_DIR}
- --result=man-de.pdf
- man-de.tex
+ --result=man-de.pdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/man-de.tex
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-add_custom_target ( man-de ALL
- DEPENDS man-de.pdf
+add_custom_target ( manual
+ DEPENDS man-de.pdf
)
-install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
+install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
${CMAKE_CURRENT_BINARY_DIR}/man-de.pdf )
set (extraClean man-de.log man-de.tmp man-de.tuo man-de.tui
diff --git a/muse/doc/man/en/CMakeLists.txt b/muse/doc/man/en/CMakeLists.txt
index a5bc1a8b..ba97e6d1 100644
--- a/muse/doc/man/en/CMakeLists.txt
+++ b/muse/doc/man/en/CMakeLists.txt
@@ -18,24 +18,23 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#=============================================================================
-add_custom_command (
+add_custom_command (
OUTPUT man-en.pdf
- DEPENDS
+ DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/man-en.tex
${CMAKE_CURRENT_SOURCE_DIR}/projects.tex
- COMMAND ${TEXEXEC_PATH}/texexec
- ARGS --language=en --verbose --batch --pdf
- --path=${CMAKE_CURRENT_SOURCE_DIR}
- --result=man-en.pdf
- man-en.tex
+ COMMAND ${TEXEXEC_PATH}/texexec
+ ARGS --language=en --verbose --batch --pdf
+ --result=man-en.pdf
+ ${CMAKE_CURRENT_SOURCE_DIR}/man-en.tex
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
-add_custom_target ( man-en ALL
- DEPENDS man-en.pdf
+add_custom_target ( manual
+ DEPENDS man-en.pdf
)
-install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
+install_files ( /share/${MusE_INSTALL_NAME}/doc/ .pdf
${CMAKE_CURRENT_BINARY_DIR}/man-en.pdf )
set (extraClean man-en.log man-en.tmp man-en.tuo man-en.tui
diff --git a/muse/muse/driver/jack.cpp b/muse/muse/driver/jack.cpp
index d5b1d752..e942fb43 100644
--- a/muse/muse/driver/jack.cpp
+++ b/muse/muse/driver/jack.cpp
@@ -18,6 +18,7 @@
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
+#include "config.h"
#include "al/al.h"
#include "al/tempo.h"
#include "audio.h"
@@ -855,7 +856,12 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
case ME_CONTROLLER:
case ME_PITCHBEND:
{
+#ifdef JACK107
unsigned char* p = jack_midi_event_reserve(pb, ft, 3);
+#endif
+#ifdef JACK103
+ unsigned char* p = jack_midi_event_reserve(pb, ft, 3, segmentSize);
+#endif
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -869,7 +875,12 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
case ME_PROGRAM:
case ME_AFTERTOUCH:
{
+#ifdef JACK107
unsigned char* p = jack_midi_event_reserve(pb, ft, 2);
+#endif
+#ifdef JACK103
+ unsigned char* p = jack_midi_event_reserve(pb, ft, 2, segmentSize);
+#endif
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -882,7 +893,12 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
{
const unsigned char* data = e.data();
int len = e.len();
+#ifdef JACK107
unsigned char* p = jack_midi_event_reserve(pb, ft, len+2);
+#endif
+#ifdef JACK103
+ unsigned char* p = jack_midi_event_reserve(pb, ft, len+2, segmentSize);
+#endif
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -909,6 +925,11 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
void JackAudio::startMidiCycle(Port port)
{
void* port_buf = jack_port_get_buffer(port.jackPort(), segmentSize);
+#ifdef JACK107
jack_midi_clear_buffer(port_buf);
+#endif
+#ifdef JACK103
+ jack_midi_clear_buffer(port_buf, segmentSize);
+#endif
}
diff --git a/muse/synti/mus/mus.cpp b/muse/synti/mus/mus.cpp
index 90a00cc6..adbf153b 100644
--- a/muse/synti/mus/mus.cpp
+++ b/muse/synti/mus/mus.cpp
@@ -50,19 +50,35 @@ static int processAudio(jack_nframes_t nFrames, void*)
int nch = mess->channels();
for (int i = 0; i < nch; ++i) {
outBuffer[i] = (float*)jack_port_get_buffer(outPorts[i], nFrames);
+#ifdef JACK107
jack_midi_clear_buffer(outBuffer[i]);
+#endif
+#ifdef JACK103
+ jack_midi_clear_buffer(outBuffer[i], nFrames);
+#endif
// memset(outBuffer[i], 0, sizeof(float) * nFrames);
}
while(mess->eventsPending())
mess->processEvent(mess->receiveEvent());
void* midi = jack_port_get_buffer(inPort, nFrames);
+#ifdef JACK107
int n = jack_midi_get_event_count(midi);
+#endif
+#ifdef JACK103
+ int n = jack_midi_get_event_count(midi, nFrames);
+#endif
unsigned offset = 0;
for (int i = 0; i < n; ++i) {
jack_midi_event_t event;
+
+#ifdef JACK107
jack_midi_event_get(&event, midi, i);
+#endif
+#ifdef JACK103
+ jack_midi_event_get(&event, midi, i, nFrames);
+#endif
mess->process(outBuffer, offset, event.time - offset);
offset = event.time;
MidiEvent e;