The HTC One M8 has 24/96 DAC. On Harman/Kardon Edition it's unlocked otherwise needs this:
HTC One_M8 Harman/Kardon Edition + BoomSound + JVL mod
Or it's stuck at 16/48. I just installed that mod it sounds great but at any output (AudioTrack and OpenSL) still outputs 16/48 (files: 24bit/48kHz FLAC)