Changeset f7771c6 for examples/utils.c
- Timestamp:
- Sep 17, 2018, 4:31:55 AM (6 years ago)
- 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:
- d47ad546
- Parents:
- 230101d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.c
r230101d rf7771c6 76 76 77 77 #if HAVE_JACK 78 #define MAX_MIDI_EVENTS 128 78 79 aubio_jack_t *jack_setup; 79 80 jack_midi_event_t ev; 81 jack_midi_data_t midi_data[MAX_MIDI_EVENTS * 3]; 82 size_t midi_event_count = 0; 80 83 #endif /* HAVE_JACK */ 81 84 … … 129 132 void examples_common_del (void) 130 133 { 131 #ifdef HAVE_JACK132 if (ev.buffer) free(ev.buffer);133 #endif134 134 del_fvec (ibuf); 135 135 del_fvec (obuf); … … 148 148 #ifdef HAVE_JACK 149 149 ev.size = 3; 150 ev.buffer = malloc (3 * sizeof (jack_midi_data_t));151 150 ev.time = 0; // send it now 152 151 debug ("Jack activation ...\n"); … … 194 193 #ifdef HAVE_JACK 195 194 if (usejack) { 195 ev.buffer = midi_data + midi_event_count++ * 3; 196 if (midi_event_count >= MAX_MIDI_EVENTS) { 197 midi_event_count = 0; 198 } 196 199 ev.buffer[2] = velo; 197 200 ev.buffer[1] = pitch;
Note: See TracChangeset
for help on using the changeset viewer.