was toying around with linux and found a bug (I think?) in juce_linux_Audio.cpp :
the ALSAAudioIODevice::start() function does not perform a callback to the audiodevicemanager, updating it with the real samplerate. Which later on causes an assert in MidiMessageCollector::addMessageToQueue, because it detects the dummy default samplerate has never been reset to the right one. For some reason this problem does not occur in the juce demo, but it did in my own app.
The fix that seems to work for me is:
[code] void start (AudioIODeviceCallback* callback)
{
if (! isOpen_)
callback = 0;
internal->setCallback (callback);
if (callback)
{
callback->audioDeviceAboutToStart(sampleRate, bufferSizeSamples);
}
isStarted = (callback != 0);
}[/code]
note: for this fix you also need to add sampleRate and BufferSizeSamples as private members to the class and initialize them in the open() method.