AudioApplication: Getting the number of channels expected in prepareToPlay

I’m struggling with a fairly simple question: I need to know the expected number of input channels in a simple audio application during the prepareToPlay call. I searched for some obvious function like getNumberOfActiveInputChannels, however I didn’t find anything like that. My current working solution is:
int numInChannels = deviceManager.getCurrentAudioDevice()->getActiveInputChannels().countNumberOfSetBits();
But that looks like a really complicated way to retrieve this simple information so I suspect I missed something very obvious :thinking: