This is driving me mad…
I have a MidiBuffer in my class ‘midiEvents’ and I’m doing
JUCE_NAMESPACE::uint8 data [4];
data[0] = byte1;
data[1] = byte2;
data[2] = byte3;
midiEvents.addEvent (data, 3, 0);
… modifed from juce_AudioUnitWrapper.cpp
I crash in the call to addEvent() with a divide by zero error in ArrayAllocationBase::ensureAllocatedSize. I assume it must be the granularity that is zero but can’t see how it possibly can be, it should be set to 32 on initialisation of MidiBuffer. Any ideas?