BR: MIDI input asserts on Big Sur

Steps to reproduce:

  • Pull latest develop
  • Create a plugin project
  • Enable midi input, synth
  • Press a key
  • jassert
    // the messages that come in here need to be time-stamped correctly - see MidiInput
    // for details of what the number should be.
    jassert (message.getTimeStamp() != 0);
2 Likes

I’m getting that bug too.

I believe it’s related to the new implementation strategies in juce_mac_CoreMidi.mm:

    #if    (defined (MAC_OS_VERSION_11_0) || defined (__IPHONE_14_0))
     #if (MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_VERSION_11_0 || __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_14_0)
      #define JUCE_HAS_NEW_COREMIDI_API 1
      #define JUCE_HAS_OLD_COREMIDI_API 0
      constexpr auto implementationStrategy = ImplementationStrategy::onlyNew;
     #else
      #define JUCE_HAS_NEW_COREMIDI_API 1
      #define JUCE_HAS_OLD_COREMIDI_API 1
      constexpr auto implementationStrategy = ImplementationStrategy::both;
     #endif
    #else
     #define JUCE_HAS_NEW_COREMIDI_API 0
     #define JUCE_HAS_OLD_COREMIDI_API 1
     constexpr auto implementationStrategy = ImplementationStrategy::onlyOld;
    #endif

Commenting out that whole section and replacing it with:

#define JUCE_HAS_NEW_COREMIDI_API 0
#define JUCE_HAS_OLD_COREMIDI_API 1
constexpr auto implementationStrategy = ImplementationStrategy::onlyOld;

Fixes it for me.

i can’t say for sure (because it looks like these are dynamically defined at build time in a place i can’t easily find) but i think that should be MAC_OS_X_VERSION_11_0 since that’s how the other versions mentioned in the source code are styled, eg MAC_OS_X_VERSION_10_5

edit: or maybe MAC_OS_X_VERSION_11 since that lines up with the version strings here

Bump. Can this be looked it?

Does this fix the issue?