Of course you can with a bit of number-crunching (histogramm binning of sample values), the more data you have (several seconds of "normal" music) the higher the reliability of the bit depth detection.
and when exactly would this relevant information be displayed on the DAC ?
After the song has ended, or will you buffer and process the entire song in the DAC to get that info before the song begins ?
and will it be peak, or average, or something else ?
Will it be what the song was originally, or what you converted it to ?
Does he want to accurately display 4 bits if he plays a 4 bit file in a 24 bit container, or does he want to display 24 bits for the 4 bit file ?
It will still sound like a 4 bit file if you convert the song to 24 bits, but how will you accurately determine if it is still a 4 bit file
(now in a 24 bit container) ?
When not using wasapi, does he want to see that Windows is set to 32 bits when he plays his 4 bit file in a 24 bit container, or does he want to see 24 bits displayed ?
The original poster has not specified the information required to make such a determination
There is another way to determine the bit depth that is just as accurate as anything I've heard so far......
Just stick a phoney display on the front of your DAC that says 33 1/3 bits and call it an upgrade
I'm sure your record loving friends can easily hear the difference