Requesting audio channel permissions in application

I would like to get confirmation how to actually get all the audio interface input and output channels for use the proper way.

Below code is almost a direct copy from JUCE examples, which requests permissions to use maximum of 256 audio channels. If I want to give my software full access to all of the available audio channels, should I just set the number of requested channels to something huge, such as 1000000, and that’ll work just fine?

In the below example the amount of requested inputs and outputs is set to 256.

    RuntimePermissions::request(RuntimePermissions::recordAudio, [&] (bool granted) mutable
    {
        juce::String error = mr_device_manager.initialise(granted ? 256 : 0, 256, nullptr, false);
        jassert(error.isEmpty());
    } );

Is this the proper way of doing this or is there a better way?