Changeset 3a8f0bf
- Timestamp:
- Sep 17, 2018, 3:14:02 PM (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:
- e561ca7
- Parents:
- 8c4918a (diff), 8ba682a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
examples/utils.c
r8c4918a r3a8f0bf 76 76 77 77 #if HAVE_JACK 78 #define MAX_MIDI_EVENTS 128 79 #define MAX_MIDI_EVENT_SIZE 3 78 80 aubio_jack_t *jack_setup; 79 81 jack_midi_event_t ev; 82 jack_midi_data_t midi_data[MAX_MIDI_EVENTS * MAX_MIDI_EVENT_SIZE]; 83 size_t midi_event_count = 0; 80 84 #endif /* HAVE_JACK */ 81 85 … … 129 133 void examples_common_del (void) 130 134 { 131 #ifdef HAVE_JACK132 if (ev.buffer) free(ev.buffer);133 #endif134 135 del_fvec (ibuf); 135 136 del_fvec (obuf); … … 147 148 148 149 #ifdef HAVE_JACK 149 ev.size = 3; 150 ev.buffer = malloc (3 * sizeof (jack_midi_data_t)); 150 ev.size = MAX_MIDI_EVENT_SIZE; 151 151 ev.time = 0; // send it now 152 152 debug ("Jack activation ...\n"); … … 194 194 #ifdef HAVE_JACK 195 195 if (usejack) { 196 ev.buffer = midi_data + midi_event_count++ * MAX_MIDI_EVENT_SIZE; 197 if (midi_event_count >= MAX_MIDI_EVENTS) { 198 midi_event_count = 0; 199 } 196 200 ev.buffer[2] = velo; 197 201 ev.buffer[1] = pitch;
Note: See TracChangeset
for help on using the changeset viewer.