`AVAudioSequencer` crashes when headphones are connected and disconnected twice
I’m running into a strange issue where an AVAudioSequencer
crashes the second time prepareToPlay
is called when I connect and disconnect headphones two times without starting the sequencer. I’m subscribing to the AVAudioEngineConfigurationChange
notification, and recreating my audio sampler nodes in response. Everything is fine if the sequencer is started between the headphone disconnections. Anyone have an idea as to what is going on? I’ve included a minimal example that demonstrates the issue, it’s reproducible for me in the simulator. The SoundFont is an open source piano one I found online.