XMP-based decoder plugin

Forums:

Hi! I just wrote a new decoder plugin because modplug plays some modules incorrectly.
Grab it from github repo. Criticism and bug reports are welcome!
https://github.com/drradio/xmp-decoder

Works for me. I didn't examine the code in details but I have three comments:

1. Tried to make it work with libxmp-lite version. It builds fine after modifying configure code but for some reason I didn't track down, it wouldn't load in MOC. ldd didn't report any problems.

2. It would be nice if you would follow MOC tradition and call the functions in xmp.c with prefix xmp_. So instead of __open() use xmp_open(). I don't think there is a conflict with library functions. The same goes with variable OUTPUTRATE.

3. For the future, OUTPUTRATE would be better handled as an option configurable in .moc/config file. Moreover with default setting of Alsa's dmix, 48000 would be a better default value.

I have found why it doesn't work with libxmp-lite: it is because format loaders have different names in sources and thus linking fails. You can fix it by substituting in format.c it_loader, xm_loader and s3m_loader to libxmp_loader_it, libxmp_loader_xm and libxmp_loader_s3m respectively. Then re-build and enjoy! :)

For me it did link, but it failed on runtime. MOC hides the real error so I could only see "file not found" message.

Do you think that libxmp-lite library is simply broken- is it a reason why you suggest modifying its internals? Seems it might be related to this commit https://github.com/cmatsuoka/libxmp/commit/a02883528979bbefc6d6d4be79d10b853e7b7041 which is not in the released code.

Try with setting LD_LIBRARY_PATH=<directory where libxmp-lite is located>.