add little/big endian support, extend wav spec