DeviceManager hits Compiler Breakpoint


when I select a Midi Output Device in the Devicemanager, i hit this error:

    // If the line below triggers a compiler error, it means that you are using 
    // an incomplete type for ObjectType (for example, a type that is declared 
    // but not defined). This is a problem because then the following delete is 
    // undefined behaviour. The purpose of the sizeof is to capture this situation. 
    // If this was caused by a ScopedPointer to a forward-declared type, move the 
    // implementation of all methods trying to use the ScopedPointer (e.g. the destructor 
    // of the class owning it) into cpp files where they can see to the definition 
    // of ObjectType. This should fix the error.

The debugger says the object that is calling this has the name “midi out”.
in the maincomponent destructor i call this:

    deviceManager.removeMidiInputCallback("", this); 

So dont know how to fix the error…

How about

deviceManager.removeMidiInputCallback (MidiInput::getDevices()[INDEX_OF_THE_DEVICE], this);


Have a look at JUCE/examples/Demo/Source/Demos/MidiDemo.cpp for inspiration.

Hey , thx!

 	const StringArray list (MidiInput::getDevices());

	for (int i = 0; i < list.size(); i++)
 		deviceManager.removeMidiInputCallback (list[i], this);

fixed it. I needed to select all midi inputs by droping an empty string
in addMidiCallback function…

greetz equinox