The optimal number of audio channels is calculated based on the audio format, bitrate, and quality. The formula used is:
Channels = (Bitrate / Quality) / 64