Re: Resources to learn more about the difference between packed and unpacked (high/low aligned) samples?
Re: Resources to learn more about the difference between packed and unpacked (high/low aligned) samples?
- Subject: Re: Resources to learn more about the difference between packed and unpacked (high/low aligned) samples?
- From: Paul Davis <email@hidden>
- Date: Mon, 12 May 2014 07:47:23 -0400
This is 32 bits:
11111111111111111111111111111111
This is 32 bits with 8 bits set to zero
00000000111111111111111111111111
This is 32 bits with a different 8 bits set to zero
11111111111111111111111100000000
In the last two examples, there are 24 bits set to 1. You could consider that as a 24 bit audio sample packed into a 32 bit integer. But the two cases are very different. One of them is "low aligned" and one of them is "high aligned".
Audio interfaces don't produce more than 24 bits of data (even the ones that say they produce 24 typically don't actually get that close. If they really did generate 32 bits, the least significant bits would fluctuate with brownian noise (atomic motion). But computers like 32 bit chunks of data. So the interface will typically pack the 24 bit sample into a 32 bit chunk, which means that it has to leave 8 bits unset (or maybe not .... but that is another story).
Which 8 bits it leaves unset defines whether the format is "high aligned" or "low aligned". Note that this intersects just a little with the endianness of the processors in use. In general you don't have to think about it, except for the occasional wierd case where your interface's processor(s) and the CPU have different endianess. This has always been exceedingly rare and almost never happens these days.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden