Changeset 8f0db97


Ignore:
Timestamp:
Jan 12, 2017, 11:56:28 PM (8 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, sampler, yinfft+
Children:
b4eadf0, f432bb1
Parents:
c4d014a
Message:

examples/utils.c: allocate note event once

File:
1 edited

Legend:

Unmodified
Added
Removed
  • examples/utils.c

    rc4d014a r8f0db97  
    7777#if HAVE_JACK
    7878aubio_jack_t *jack_setup;
     79jack_midi_event_t ev;
    7980#endif /* HAVE_JACK */
    8081
     
    128129void examples_common_del (void)
    129130{
     131#ifdef HAVE_JACK
     132  if (ev.buffer) free(ev.buffer);
     133#endif
    130134  del_fvec (ibuf);
    131135  del_fvec (obuf);
     
    143147
    144148#ifdef HAVE_JACK
     149    ev.size = 3;
     150    ev.buffer = malloc (3 * sizeof (jack_midi_data_t));
     151    ev.time = 0; // send it now
    145152    debug ("Jack activation ...\n");
    146153    aubio_jack_activate (jack_setup, process_func);
     
    186193{
    187194#ifdef HAVE_JACK
    188   jack_midi_event_t ev;
    189   ev.size = 3;
    190   ev.buffer = malloc (3 * sizeof (jack_midi_data_t)); // FIXME
    191   ev.time = 0;
    192195  if (usejack) {
    193196    ev.buffer[2] = velo;
Note: See TracChangeset for help on using the changeset viewer.