PATCH: support for libmikmod-3.1.12

General
Chris
2011-07-29
2013-04-16
  • Chris
    Chris
    2011-07-29

    Hi,

    I've created a patch to integrate libmikmod in mp3blaster-3.2.5.

    The patch can be found at http://pastebin.com/download.php?i=wrb9DdYg
    It is available for 4 weeks from 2011-07-29 on.

    Details about the patch:
    libmikmod is integrated by adding an output driver to mikmod, which passes the decoded module music to mp3blaster.
    The implementation is straight forward with only few changes (around 500 lines).

    The only drawback is, that the patch includes a modified (2 lines of code) mikmod.h file since the original file defines a BOOL typedef, which already is defined in /usr/include/sys/Amd.h. I didn't find a way around this problem. Maybe libmikmod gets itself an update soon.

    This patch also contains fixes for libaudio2/network audio system and some problems with strrchr:

    diff -Naur mp3blaster-3.2.5/src/global.cc mp3blaster-3.2.5.mikmod-drv/src/global.cc
    -- mp3blaster-3.2.5/src/global.cc 2009-01-24 16:25:10.000000000 +0100
    +++ mp3blaster-3.2.5.mikmod-drv/src/global.cc 2011-07-29 18:30:01.000000000 +0200
    @@ -371,7 +371,7 @@
    is_sid(const char *filename)
    {
    #ifdef HAVE_SIDPLAYER
    - char *ext = strrchr(filename, '.');
    + const char *ext = strrchr(filename, '.');
    if (ext) {
    if (!strcasecmp(ext, ".psid")) return 1;
    if (!strcasecmp(ext, ".sid")) return 1;

    diff -Naur mp3blaster-3.2.5/mpegsound/nasplayer.cc mp3blaster-3.2.5.mikmod-drv/mpegsound/nasplayer.cc
    -- mp3blaster-3.2.5/mpegsound/nasplayer.cc 2009-01-24 16:29:08.000000000 +0100
    +++ mp3blaster-3.2.5.mikmod-drv/mpegsound/nasplayer.cc 2011-07-29 18:05:44.000000000 +0200
    @@ -34,7 +34,7 @@
    }
    }

    -NASplayer *NASplayer::opendevice(char *server)
    +NASplayer *NASplayer::opendevice(const char *server)
    {
    AuServer *aud;
    char *return_status;

    Hope you like it!!

    Chris

     
  • Bram Avontuur
    Bram Avontuur
    2011-08-30

    Hey Chris,

    Sorry for the late response. I'm just a little too late to grab the patch; I would certainly welcome it! If you reupload it, I'll have a look at it and merge it in with the official release.

    Regards,
    Bram