Changeset 8ba682a


Ignore:
Timestamp:
Sep 17, 2018, 3:08:38 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
3a8f0bf
Parents:
d47ad546
Message:

examples/utils.c: define MAX_MIDI_EVENT_SIZE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rd47ad546 r8ba682a  
    7777#if HAVE_JACK
    7878#define MAX_MIDI_EVENTS 128
     79#define MAX_MIDI_EVENT_SIZE 3
    7980aubio_jack_t *jack_setup;
    8081jack_midi_event_t ev;
    81 jack_midi_data_t midi_data[MAX_MIDI_EVENTS * 3];
     82jack_midi_data_t midi_data[MAX_MIDI_EVENTS * MAX_MIDI_EVENT_SIZE];
    8283size_t midi_event_count = 0;
    8384#endif /* HAVE_JACK */
     
    147148
    148149#ifdef HAVE_JACK
    149     ev.size = 3;
     150    ev.size = MAX_MIDI_EVENT_SIZE;
    150151    ev.time = 0; // send it now
    151152    debug ("Jack activation ...\n");
     
    193194#ifdef HAVE_JACK
    194195  if (usejack) {
    195     ev.buffer = midi_data + midi_event_count++ * 3;
     196    ev.buffer = midi_data + midi_event_count++ * MAX_MIDI_EVENT_SIZE;
    196197    if (midi_event_count >= MAX_MIDI_EVENTS) {
    197198      midi_event_count = 0;
Note: See TracChangeset for help on using the changeset viewer.