I spent a few days researching this a year ago or so. The absolutely simplest, fastest, most fool-proof and definitively lossless way is to use ffmpeg with this commandline:
Code:
ffmpeg -i "source-audio.dtshd" output.flac
It's as simple as that. ffmpeg's dts library supports the HD MA extension as well as other HD extensions like HD HRA etc., tested it myself.
In eac3to, last time I checked you could choose between some kind of "hack" with a dll from some official decoder, but that one had different bugs depending on version.
And then there was a better one for eac3to called libdcadec.
But here's the plottwist. Here's the libdcadec github repository:
https://github.com/foo86/dcadec
As you can see, it hasn't been updated for years. That's because the code has been integrated into ffmpeg and is being maintained there.
So with ffmpeg you pretty much get the absolutely best dts decoder there currently is.
I've never tried the Audacity route, but it sounds like a bit of a waste of time and a potential error source to me tbh, the commandline does not require you to load and then re-save the file, it transcodes it on-the-fly. It can even read it straight out of a video file, but in that case I recommend adding "-vn" before "output.flac" as an option to make it not process the video stream, otherwise it will slow it down.
It will also automatically save it as either 16 bit or 24 bit FLAC depending on the bit depth of the source DTS HD MA file, to guarantee a lossless perfect representation.
There is a single downside: If you do not transcode to FLAC, but to WAV instead, it will always default to 16 bit for some reason. If you want to transcode a 24-bit DTS-HD MA file directly to WAV instead of FLAC, add "-acodec pcm_s24le" before "output.wav".
Also, if you have a 24 bit DTS-HD MA file with a lot of channels and want to output to WAV instead of FLAC, you may realize the file becomes bigger than 4GB. Since WAV files do not really support this, you will get an error message and likely be unable to properly open it anywhere. In this case I recommend to save as ".w64" instead. It's the Wave64 file format, which is basically just a normal WAV file format, except it can save >4GB of data. Compatibility is a bit limited though, not every software can open it, for example video editing software sometimes can't read these. Audio editors usually can tho. Otherwise the same caveat with 24 bit that goes for WAV also goes for W64, you have to specify 24 bit manually.
Again, safest simplest way is to convert straight to FLAC and you don't have to worry about a thing, and you can always transcode the FLAC to WAV later if you need it too, it's a lossless codec after all. And it's relatively widely supported tho. And it needs less space than a WAV.