1
$\begingroup$

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..

$\endgroup$
  • 2
    $\begingroup$ yes, it's -32768 to 32767. Little endian just refers to the byte order. $\endgroup$ – Hilmar Apr 23 at 16:30
1
$\begingroup$

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.
| improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ The little-endian order is 0x17 0x23 $\endgroup$ – Justme Apr 23 at 21:51
  • $\begingroup$ What a relief, I apppreciate $\endgroup$ – Laurent Duval Apr 24 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.