Fix read of 16 bit samples

Reapplying fix that got lost in merge. See 9a25322790379dfa58071dd7e25260b957f57092.