summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--muse/ChangeLog2
-rw-r--r--muse/muse/driver/jack.cpp12
-rw-r--r--muse/synti/mus/mus.cpp6
3 files changed, 11 insertions, 9 deletions
diff --git a/muse/ChangeLog b/muse/ChangeLog
index fe0210c0..2527615c 100644
--- a/muse/ChangeLog
+++ b/muse/ChangeLog
@@ -1,3 +1,5 @@
+29.5. (ws)
+ - update to current JACK (changes in midi interface)
26.05 (ng)
- update CMakeLists.txt to check that Qt4 > 4.3.0 and jack > 0.103.0
23.5. (ws)
diff --git a/muse/muse/driver/jack.cpp b/muse/muse/driver/jack.cpp
index a72c49c4..5480c35f 100644
--- a/muse/muse/driver/jack.cpp
+++ b/muse/muse/driver/jack.cpp
@@ -809,11 +809,11 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
}
void* pb = jack_port_get_buffer(port.jackPort(), segmentSize);
int ft = e.time() - lastFrameTime();
- if (ft < 0 || ft >= segmentSize) {
+ if (ft < 0 || ft >= (int)segmentSize) {
printf("JackAudio::putEvent: time out of range %d\n", ft);
if (ft < 0)
ft = 0;
- if (ft > segmentSize)
+ if (ft > (int)segmentSize)
ft = segmentSize - 1;
}
switch(e.type()) {
@@ -823,7 +823,7 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
case ME_CONTROLLER:
case ME_PITCHBEND:
{
- unsigned char* p = jack_midi_event_reserve(pb, ft, 3, segmentSize);
+ unsigned char* p = jack_midi_event_reserve(pb, ft, 3);
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -837,7 +837,7 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
case ME_PROGRAM:
case ME_AFTERTOUCH:
{
- unsigned char* p = jack_midi_event_reserve(pb, ft, 2, segmentSize);
+ unsigned char* p = jack_midi_event_reserve(pb, ft, 2);
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -850,7 +850,7 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
{
const unsigned char* data = e.data();
int len = e.len();
- unsigned char* p = jack_midi_event_reserve(pb, ft, len+2, segmentSize);
+ unsigned char* p = jack_midi_event_reserve(pb, ft, len+2);
if (p == 0) {
fprintf(stderr, "JackMidi: buffer overflow, event lost\n");
return;
@@ -877,6 +877,6 @@ void JackAudio::putEvent(Port port, const MidiEvent& e)
void JackAudio::startMidiCycle(Port port)
{
void* port_buf = jack_port_get_buffer(port.jackPort(), segmentSize);
- jack_midi_clear_buffer(port_buf, segmentSize);
+ jack_midi_clear_buffer(port_buf);
}
diff --git a/muse/synti/mus/mus.cpp b/muse/synti/mus/mus.cpp
index 3100ae5c..90a00cc6 100644
--- a/muse/synti/mus/mus.cpp
+++ b/muse/synti/mus/mus.cpp
@@ -50,19 +50,19 @@ 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);
- jack_midi_clear_buffer(outBuffer[i], nFrames);
+ jack_midi_clear_buffer(outBuffer[i]);
// memset(outBuffer[i], 0, sizeof(float) * nFrames);
}
while(mess->eventsPending())
mess->processEvent(mess->receiveEvent());
void* midi = jack_port_get_buffer(inPort, nFrames);
- int n = jack_midi_get_event_count(midi, nFrames);
+ int n = jack_midi_get_event_count(midi);
unsigned offset = 0;
for (int i = 0; i < n; ++i) {
jack_midi_event_t event;
- jack_midi_event_get(&event, midi, i, nFrames);
+ jack_midi_event_get(&event, midi, i);
mess->process(outBuffer, offset, event.time - offset);
offset = event.time;
MidiEvent e;