src/XJack.cpp
// jack process callback for the midi output
jack process callback for the midi output
jack process callback for the midi output
inline void XJack::process_midi_out(void *buf, jack_nframes_t nframes) {
    int i = mmessage->next();
    for (unsigned int n = event_count; n < nframes; n++) {
        if (i >= 0) {
            unsigned char* midi_send = jack_midi_event_reserve(buf, n, mmessage->size(i));
            if (midi_send) {
                mmessage->fill(midi_send, i);
                send_to_alsa(midi_send, mmessage->size(i));
                if (record) record_midi(midi_send, n, mmessage->size(i));
            }
            i = mmessage->next(i);
        } else if (play) {
            play_midi(buf, n);
        }
    }
}
inline void XJack :: process_midi_out ( void * buf , jack_nframes_t nframes ) { int i = mmessage -> next ( ) ; for ( unsigned int n = event_count ; n < nframes ; n ++ ) { if ( i >= 0 ) { unsigned char * midi_send = jack_midi_event_reserve ( buf , n , mmessage -> size ( i ) ) ; if ( midi_send ) { mmessage -> fill ( midi_send , i ) ; send_to_alsa ( midi_send , mmessage -> size ( i ) ) ; if ( record ) record_midi ( midi_send , n , mmessage -> size ( i ) ) ; } i = mmessage -> next ( i ) ; } else if ( play ) { play_midi ( buf , n ) ; } } }
jack process callback for the midi output
jack process callback for the midi output