Question about MidiOutput


#1

I am just looking at your MidiOutput code, and I was wondering if the line
delete message;
could perhaps cause Midi Output jitters because the delete operator might sometimes take a little bit longer? I guess it could happen in some situations when the OS is just busy doing something…
For these kind of things I always wrote my own little memory management that would get some object from a linked list of preallocated objects and when finished put it back in the linked list. That works very well. BTW that would be a cool JUCE class; a class that contains preallocated objects and you can then ask it to give a pointer to one of these and then you give it back later. Perhaps there even is such class in JUCE and I don´t know about it :slight_smile:


#2

Yes, I guess it could possibly glitch very slightly, though wouldn’t expect it to be too bad. And yes, an object pool is a good idea too!