Converting 16BitPCM to .wav, after switching endianness, the .wav file plays backwards
问题 I am trying to build an Android app that records PCM audio and exports it as a wav file. It worked fine for 8BitPCM, but when I switched to 16BitPCM I got white noise. I finally figured out it was the endianness of the byte array, but now, after converting from Little Endian to Big Endian, I get my audio crystal clear, but reversed! Here is how I call the method: byte[] inputByteArray = convertLittleEndianToBig(readToByte(input)); and then that byte[] is appended to my .wav header here: