I'm trying to read data, I want this data in numbers (int double float something i can operate with in order to make some dsp) from a buffer obtained from a pcm configured as S16_LE, (signed 16 bits little endian) but i don't understand how information is organized inside the buffer. I think 16 bits means that signal values are between -32767 and 32768 but nothing more..
-
2$\begingroup$ yes, it's -32768 to 32767. Little endian just refers to the byte order. $\endgroup$– HilmarApr 23, 2020 at 16:30
1 Answer
Endianness refers to how multi-byte words are organized, supposing that a byte is an 8-bit word. For big-endian, ordering puts the most significant byte first and the least significant byte last. This is the converse for little-endians.
An unsigned hexadecimal number 0x2317
needs two 8-bytes
- big-endian order:
0x23
0x17
, - little-endian order :
0x17
0x23
.
-
2