I have an AKAI LPK25 set to enabled (either with DeviceManager::setMidiInputEnabled(true) or by initializing the AudioDeviceManager using an XML). Whenever I pull out the AKAI and then reinsert it, JUCE asserts as follows:
// JUCE_MidiDataConcatenator.h
template <typename UserDataType, typename CallbackType>
void pushMidiData (const void* inputData, int numBytes, double time,
UserDataType* input, CallbackType& callback)
{
...
if (len > 0)
{
int used = 0;
const MidiMessage m (data, len, used, 0, time);
if (used <= 0)
break; // malformed message..
jassert (used == len);
callback.handleIncomingMidiMessage (input, m);
runningStatus = data[0];
}
}
len is always 1, used is always 2, but the values in data always change around (hinting at a garbage memory bug).
If I disable the AKAI first (using my GUI) and then pull-out/reinsert, nothing changes. Starting a timer that periodically checks for removed devices and then calling AudioDeviceManager::setMidiInputEnabled(false) on them also works.
When I try to do the same with a StudioLogic VMK-88, everything works just fine.
I am using OSX, but am not sure if this also happens under Windows (which is why I put it in the general forum). Using JUCE 3.1.1.
