I have a DVD that has both AC3 and DTS track on it that I'm playing on the latest MrMc on ATV 4K. Now, AC3 is quieter and less dynamic than the DTS track. When I play the same DVD with Kodi on a Windows PC with bitstreaming enabled, both soundtracks are equally loud. However, when I switch Dynamic Compression from "Off" to "High" on my amplifier (Marantz NR1504) the difference between the two tracks is exactly like when playing on Apple TV. Furthermore, when Kodi does the decoding so bitstreaming is disabled, the same volume/dynamic range difference is present unless you edit advancedsettings.xml. Here is a Kodi forum thread explaining the issue further.
So it seems that Apple TV is applying dynamic range compression aka DRC on every AC3 track it decodes. It's an option on many media players (even on Kodi if not via GUI toggle - as explained above) and here it's stated that that if the option to turn DRC off is not present, it must be applied when decoding. Here's the quote for good measure:
Reduce Loud Sounds is disabled on ATV settings and sound outpust is set to Best Quality Available. I can provide a sample of the DVD if needed.(1) Some decoders apply DRC (Dynamic Range Compression). Stupidly Dolby's license requests that DRC must be applied, unless your decoder has an option to turn it on/off. Only then the decoder is allowed to not apply DRC. The purpose of DRC is to limit the dynamic range of an audio track, mainly to not annoy neighbours or to accomodate to noisy living room conditions. For our purposes DRC is catastrophic.
Thanks for the help and as well as for creating a great piece of software!