For an AUv3 plug-in of type kAudioUnitType_MIDIProcessor how is the plug-in supposed to figure out the sample rate of the host? I think this might be an API limitation. For instruments and effects, we can read the AUAudioUnit's output bus format and check the sample rate. But MIDI FX plug-ins have no audio I/O. And even if I set them, Logic Pro, for example, doesn't update the AU if I change the sample rate in Logic.
Looking at AVAudioSession.sharedInstance.sampleRate
doesn't work either, because the host can have a different sample rate from the hardware.
Is there a solution to this that I'm not aware of?