I know the WAV file format uses signed integers for 16-bit samples. It also stores them in little-endian order, meaning the lowest 8 bits come first, then the next, etc. Is the
signed int, little endian:
byte 1(lsb) byte 2(msb) --------------------------------- 7|6|5|4|3|2|1|0 | 7|6|5|4|3|2|1|0| ---------------------------------- ^ | Sign bit
You only need to concern yourself with that when reading/writing a short int to some external media. Within your program, the sign bit is the most significant bit in the short, no matter if you're on a big or little endian platform.