[Asterisk-Users] Codec Formats
Steve Kann
stevek at SteveK.COM
Fri Mar 14 14:24:53 MST 2003
On Fri, Mar 14, 2003 at 03:44:46PM -0500, John Vozza wrote:
> Thanks for the feedback but I'm still lost on this one.... (Forgive my
> ignorance please)
>
> I don't understand how "#define AST_FORMAT_ADPCM (1 << 5)" becomes
> a "format = 32" in the * console display.
2*2*2*2*2 = 32.
Okay, less obnoxiusly, the "<<" operator in C means shift. So, if you
take a 1 (binary 0000001), and shift it left 5 times, you get 00010000,
which is 2^5 which is 32.
-SteveK
--
Steve Kann - Chief Engineer - 520 8th Ave #2300 NY 10018 - (212) 533-1775
HorizonLive.com - collaborate . interact . learn
"The box said 'Requires Windows 95, NT, or better,' so I installed Linux."
More information about the asterisk-users
mailing list