Jun 16, 2009

MP3 decoding

Current version of VC components has 3 ways to decode (decompress) MPEG audio:

a) use ACM MP3 codec included with Windows. Most likely it comes with Media Player or some other codec pack. Usually this codec is limited to 64 kbps streams;

b) use BASS library, which has good decoder but is not free for commercial usage. It also tent to change its API with every release, which makes it hard to maintain from Delphi code. Currently supported version is 2.3;

c) use old mpglib.dll which is not only hard to find, but is no longer updated and does not always work as expected.

Every option has some drawbacks, so after short surfing a better solution was found:

d) mpg123 — MPEG audio decoder library, which is licensed under LGPL 2.1. It works just perfectly and is updated frequently.

Upcoming release of VC Components will include some samples showing this library in work, meanwhile you can download it and use unaLibmpg123Decoder class from unaMpgLibAPI.pas unit to decode MPEG audio. Class is well documented in sources (I hope).

No comments:

Post a Comment