HydrogenAudio

Lossless Audio Compression => Lossless / Other Codecs => Topic started by: soiaf on 2011-03-05 22:23:16

Title: haXe Apple Lossless decoder
Post by: soiaf on 2011-03-05 22:23:16
This will probably be of more interest to programmers

I have ported the open source ALAC decoder written by David Hammerton into haXe. haXe is a programming language that can be used to generate code for different target platforms/code ( see http://haxe.org/doc/intro (http://haxe.org/doc/intro) ). This means that its possible to automatically generate a version of the code in different languages; for example AS3 (used in Flash), C, Neko and within the next couple of months Java and C# (they're currently working on getting both these languages added as target languages).

The link to view/download the source code for the decoder is

https://github.com/soiaf/haXe-Apple-Lossless-decoder (https://github.com/soiaf/haXe-Apple-Lossless-decoder)

The code supports everything the original code did i.e. mono or stereo files, 16 or 24 bit files.

Apart from porting the code over I made a few small changes/improvements to the code e.g. the C version of the code did not support fixed sample sizes in the stsz atom, this new version now does.

I also made a very simple Flash demo in order to show the code working, you can get the code from the above link, or you can try the demo here:

http://members.upc.ie/p.mc.quillan/alac/alac.htm (http://members.upc.ie/p.mc.quillan/alac/alac.htm)

The demo only plays standard CD type files i.e. 16-bit, stereo, 44.1kHz files.

Hopefully there are no bugs left in the code, but if you do encounter a problem, please let me know.



Title: haXe Apple Lossless decoder
Post by: soiaf on 2011-04-03 21:55:35
While they are making good progress adding support for C# and Java targets to haXe, C# is the current priority.

So I decided to port my haXe code to Java. You can find the source code to my Java Apple lossless decoder at

https://github.com/soiaf/Java-Apple-Lossless-decoder (https://github.com/soiaf/Java-Apple-Lossless-decoder)

Same basic code as my haXe version, however I tidied up the demo decoder by adding various API methods that can be used by any program that wants to utilise the code.

As with the haXe version, any issues or questions just let me know.