This is driving me mad…
I have a MidiBuffer in my class ‘midiEvents’ and I’m doing
JUCE_NAMESPACE::uint8 data ; data = byte1; data = byte2; data = 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?