Oct 30, 2011

to x64 or not to x64

With new release of RAD Studio (XE2) Embarcadero opens a few more horizons for long forgotten Delphi developers. Now they can finally compile "Hello, World!" as x64 binary (only 6 years passed since first AMD64 chip, why so hasty?) and even target the OS X.

The switch to x64 does not come easy, though. The size of Integer and Cardinal is still 4 bytes, so if you get used to write the code like Cardinal(@val), in hope that Cardinal will follow native CPU expansion (as it was when Integer got expanded from 16 to 32 bits from Delphi 1 to Delphi 2), you fail.

How should you code instead? Pick one: UIntPtr(@val) or NativeUInt(@val). Huh? Who are these guys, you ask? Ask Delphi 2010 Help instead, it has a whole pile of information about them (2 random pages in total, actually).

For VC another challenge was to find the x64 version of codec libraries we are supporting. So far the Lame and mpg123 libraries are fine with x64, SpeeX and CELT would be fine hopefully soon.

I was having a great fun with new MPEG-TS demuxer code, hope you will find it fun to use.

The reason the FFT bands component was expanded is a new FFT code I have created for another project, which will hopefully find its place among LoS products soon. The code is pretty fast, so I decided to rebuild the bands display as well. If you find the dB scale rather confusing, I'm sorry, was doing my best.

As a part of Demos testing have compiled ANSI version of them (using Delphi 7) and was pretty surprised that most of them works fine under Windows 98.

No OS X news, haven't unpacked my MacBook Air yet (actually, haven't bought it yet).

More news to come, have fun coding with new RC of VC!