Hello, In my iOS app I am observing the AVAudioEngineConfigurationChange notification. It uses AVAudioEngine, its audio input node, some samplers, some effects, some mixers, and the output node.
So when I plug in an external audio interface into the iPad while the app is running my observer is called. AVAudioSession.inputNumberOfChannels tells me there are now 6 input channels instead of 1 (the audio interface indeed has 6 inputs). My AVAudioEngine's inputNode inputFormat shows the new hardware format (6 channels) but the outputFormat still shows 1 channel. How can I update the input node's outputFormat? Should I allocate a new engine and therefore a new inputNode? The docs forbid that: "The engine must not be deallocated from within the client's notification handler" https://developer.apple.com/documentation/foundation/nsnotification/name/1389078-avaudioengineconfigurationchange <https://developer.apple.com/documentation/foundation/nsnotification/name/1389078-avaudioengineconfigurationchange> (okay, it does not forbid to allocate a new engine, but allocating a new one also means dropping the reference to the old engine) Or should I refrain from using AVAudioEngine.inputNode and allocate my own AVAudioInputNode instance? Or should I call engine.inputNode.reset() ? I have also tried to reconnect the inputNode with the new hardware format to the next node in the graph, like the documentation suggests. As a result the next node render call fails to pullInput() with code kAudioUnitErr_CannotDoInCurrentContext (it's my own custom AU effect so I can tell). Any experience on this would be welcome. Sven
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
