See this post for why this is important when dealing with raw sample data in CoreAudio, and this post on codeproject for a more in-depth explanation. The most important thing to realise is that Bit order and Byte order significance are different beasts.
For the rest of this post, we are dealing with the representation of the binary digits from the perspective of the language, not the architecture.
By casting the resulting 32 bits to a 16 bit signed integer we take the first 16 bits, which are the bits we want, and we have a signed 16 bit sample that ranges from -32,768 to 32,767. Beautiful explanation of the 8.24 bit format, and a super clear explanation of the conversion process!

When you are thinking about bits, and bit shifting operations, think left to right in terms of significance. We assume these bits contain extra precision that we just dont need or are not interested in. We are only interested in the first 16 bits of data (the right most bits) that now contain the most significant bits of the 24 bit sample data. A brilliant side effect is that the first (left-most) bit of the first 16 bits represent the sign!

We want to preserve the sign, but chuck away 8 bits of the sample data to give us a signed 16 bit integer sample.

Best option trade brokers
Best apps for options traders
Binary options trading signals free


  1. Sayka

    For a passable yet secure number of unscrupulous scams being.


  2. edelveys

    Will be their name in the event variables can have.


  3. hmmmmmm

    Reach this type of investment buying and selling with your bonus in lower than united.