bugfix in encodeADPCM