Monkey Audio

Thanks to Peter Lemenkov who pointed me to this Monkey’s Audio decoder implementation. It has four strong points: GPL, C, small and clean. Oh, it also takes less memory too.

The only drawback is that old APE files are not supported (but nothing can play them on PPC anyway without x86 emulator) so I’m eager see APE support in MPlayer, Xine, VLC (or maybe it’s there already?). Preferably via libavcodec 😉

6 Responses to “Monkey Audio”

  1. Benjamin Zores says:

    That’s very good news.
    It’s much easier to read than the ugly JAVA version and made me continue working on ffmpeg native decoder 😉
    So good you’ve got this link !

  2. Benjamin Larsson says:

    I’m fairly sure the source can be used under LGPL also (except the range coding stuff), the author said he wanted to contribute it to ffmpeg.

  3. Kostya says:

    Lavc has rangecoder already (used in FFV1 IIRC). I think it may be tweaked to be used in ape decoder.

  4. Dave Chapman says:

    I’m the author of demac/libdemac, and am still actively working on it – to try and simplify it further, and to optimise it for use in Rockbox.

    It’s now in Rockbox SVN, and you can browse it here:

    Or checkout just the demac directory from SVN with the command:

    svn co svn:// demac

    “demac” is a simple command-line decoder to convert an APE file to WAV. The main work is in the libdemac subdirectory, and the code in tha tsubdirectory is used for the Rockbox codec.

    If there’s a demand to support earlier than 3.97 files, then I would be happy to work on it. But there are so many variations in APE’s format, the code will become very bloated if we attempt to support everything, which is why I’m hesitant to make it support all versions without a demand for it.

    Regarding ffmpeg integration, I’m happy in principle, but don’t like the LGPL, and would prefer to be able to license my code only under the GPL.

    But having said that, I don’t want to create licensing problems (especially when trying to apply improvements made in one decoder to the other) by insisting on keeping my code under the GPL, and the ffmpeg version under the LGPL.

    So if someone wants to integrate it into ffmpeg, I’ll switch the license.

  5. Kostya says:

    We had the same situation with libdca. Gildas Bazin wrote it under GPL but agreed to relicense it under LGPL for ffmpeg so DCA decoder in ffmpeg is LGPL while libdca is still GPL.

    And about old versions – if I didn’t have a bunch of APE files with version 3.92 that are not decoded on PPC the previous rant on Monkey’s Audio was not written. I think when decoder will be ported to ffmpeg it will be easy to add older versions decoder.

  6. Benjamin Zores says:

    My work on libdemac rewrite/integration to ffmpeg starts working well.
    I still have some issues to fix but as for know, I can decode a few samples and actually hear the sound with ffplay 😉
    I’ll keep you posted when I’ll have a completely working demuxer/decoder (though the demuxer seems to be nearly finished).
    Right now, the decoder uses the exact code from libdemac but, as said, the existing range coder will be used later on.