Used short in some places to reduce memory footprint; fixed a recent bug handling single channel wav files

Change-Id: Ib6760479c35aaa64caa1e7ede9b7aaba6cb72bf2