Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Nov 2018 23:03:23 -0200
From:      Marcel Bonnet <marcelbonnet@gmail.com>
To:        FreeBSD multimedia <freebsd-multimedia@freebsd.org>
Subject:   jack_umidi - jack_midi_event_get() failed, lost MIDI event
Message-ID:  <CAPe0dB=J-a4i3WWf%2Bzw7WHWEqmTx_Y_gRHjsjuxyFi1odhMDyQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hello.

I wrote a program to send System Exclusive Messages to my Roland XP-30
Keyboard. This program (QStage) connects to jack_umidi .
I send  a burst of 4296 events every time I load a sysex file.
I started jackd with a Midi BufSize > 4296 * 4 bytes:

$ /usr/local/bin/jackd -M 18000 -r -doss -r44100 -p256 -n3 -w16
-C/dev/dsp3.0 -P/dev/dsp3.0
And:
$ jack_umidi  -S -d /dev/umidi0.0

My program does not print "NOTE LOST", so I suppose that "maybe" I am using
the API correctly. But jack_umidi is zombiffied DPRINTing hundreds times
the same error  only after I load the second or third sysexfile (even if
its the same file).

Hundreds of theses error:
"umidi_write:160: jack_midi_event_get() failed, lost MIDI event."

So, I don't know if I am not writing to jack ringbuffer in a proper way or
if it could be a bug with jack_umidi.

How I write to jack:
-----------------------------------------------------------------------------------------
void MidiControl::queue_message(struct MidiControl::MidiMessage *ev) {
   int written;

    if (jack_ringbuffer_write_space(ringbuffer) < sizeof(*ev)) {
        printf("Not enough space in the ringbuffer, NOTE LOST.\n");
        return;
    }

    written = jack_ringbuffer_write(ringbuffer, (char *)ev, sizeof(*ev));

    if (written != sizeof(*ev))
        printf("jack_ringbuffer_write failed, NOTE %i LOST.", ev->data[1] );
}
-----------------------------------------------------------------------------------------

The active connections:

$  jack_lsp -c
system:capture_1
system:capture_2
system:playback_1
system:playback_2
FastTrack Pro:midi.TX
FastTrack Pro:midi.TX.CH0
FastTrack Pro:midi.TX.CH1
FastTrack Pro:midi.TX.CH2
FastTrack Pro:midi.TX.CH3
FastTrack Pro:midi.TX.CH4
FastTrack Pro:midi.TX.CH5
FastTrack Pro:midi.TX.CH6
FastTrack Pro:midi.TX.CH7
FastTrack Pro:midi.TX.CH8
FastTrack Pro:midi.TX.CH9
FastTrack Pro:midi.TX.CHA
FastTrack Pro:midi.TX.CHB
FastTrack Pro:midi.TX.CHC
FastTrack Pro:midi.TX.CHD
FastTrack Pro:midi.TX.CHE
FastTrack Pro:midi.TX.CHF
FastTrack Pro:midi.RX
   QStage:midi_out
QStage:midi_out
   FastTrack Pro:midi.RX
QStage:midi_in

Thanks,
-- 
Marcel Bonnet



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPe0dB=J-a4i3WWf%2Bzw7WHWEqmTx_Y_gRHjsjuxyFi1odhMDyQ>