-[AEAudioController start:] isn't always called when first connected to Audiobus in background
It seems there's a race condition in -[AEAudioController audiobusConnectionsChanged:]
where self.running
is returning YES
even though the engine hasn't started, and start:
is never called. I'm not quite sure why it's happening, but is it possible that the Inter-App Audio connection is starting the ioUnit?
I first noticed the problem when the AEMessageQueue
filled up and started emitting errors, this was because the polling thread was never started.
@Michael, is it as simple as changing the check from !self.running
to !_started
in audiobusConnectionsChanged:
?
Comments
Ah! Yes, I think your diagnosis is correct - looks like the unit's being started. I do believe changing it to
!_started
should work. Let me know how it goes, and I'll make the change (or send me a pull request, either way)It seems to be working. I've submitted a PR (#239)
Lovely, thank you! Merged.