I'm building an iOS app using AudioKit to play MIDI files and then play the melody using MIDIPlayer.
The AudioKit documentation states that: (here)
You will need to enable "Background Modes - Audio" in your project for this to work.
I can confirm that if I remove the audio background mode, the MIDI file playback doesn't work as expected, the sound is very slow and low-pitched, preventing the user from recognizing the song they are about to play.
I've send my app for review on the App Store and it has been rejected because the Review Team says we do not use background audio.
I've pointed them to your documentation and to this thread on the Apple Developer Forum
I would like to explain to them why AudioKit MIDI needs to use the audio background mode. I've dived into the source code but I could not figure out which part needs it.
Could you please point me to the part of the code that needs the audio background mode and/or explain to me why it is needed?
Thank you very much for your help! :)
EDIT:
git blame
brought me to this issue:
https://github.com/AudioKit/AudioKit/issues/1868
and this thread:
AKMIDICallbackInstrument - callback NOT called
It confirms the need but doesn't explain why.