RetroArch icon indicating copy to clipboard operation
RetroArch copied to clipboard

MOD support for audio mixer system (libretro-common) [$10]

Open inactive123 opened this issue 9 years ago • 15 comments

Add MOD support for the audio mixer contained inside Libretro-common.

Prerequisites for fulfilling the bounty:

  • It needs to work with random .MOD files.
  • The code should be licensed MIT so that it can be included inside libretro-common.
  • The code should be in C.

There is a $10 open bounty on this issue. Add to the bounty at Bountysource.

inactive123 avatar Apr 08 '17 00:04 inactive123

I'm considering a bounty. If it isn't completed after x days, can you get your money back?

jonmcclay avatar Apr 14 '17 03:04 jonmcclay

If a BSD clause-3 license is OK, i think micromod could do the job nicely, it's a one-filer written in C : https://github.com/martincameron/micromod/tree/master/micromod-c (the other file are just IO and resampling which is already in libretro-common)

larrykoubiak avatar May 31 '17 15:05 larrykoubiak

Can anyone confirm bsd license is okay? I am experimenting on an implementation based on ibxm (part of micromod repository).

rtissera avatar Aug 04 '17 11:08 rtissera

libretro-common (which I think would be where this code is going to belong to) is MIT-licensed. If that is BSD-compatible, then sure.

inactive123 avatar Aug 04 '17 11:08 inactive123

@twinaphex Well I think it is but I'm not a lawyer. The alternative option is ModPlug which is also BSD licensed.

rtissera avatar Aug 04 '17 11:08 rtissera

I'm fine with it personally. (the license that is) Not sure if that is enough for you to want to move forward with it, but I basically don't see a huge issue.

inactive123 avatar Aug 04 '17 11:08 inactive123

Double checking here makes me confident on the legal side.

http://janelia-flyem.github.io/licenses.html

rtissera avatar Aug 04 '17 11:08 rtissera

Sure, I think the licensing is probably going to work out just fine. Instead of licensing, the main issue is more how big the code is going to be, if there are any dependencies, etc. Usually in libretro-common we prefer things to be as modular as possible and with as few dependencies as possible. From that perspective, libchdr was very much aligned with those goals (well, it adds a FLAC dependency but that is inavoidable anyways). Libretro-common also is exclusively C code, but since libchdr was C too, I think we should be good there.

inactive123 avatar Aug 04 '17 11:08 inactive123

The reason i suggested micromod/ibxm is that it's totally self-contained, and a one filer. For some reason though, the ibxm code is made to output a wave file and contains no replay code, but that shouldn't be too much of an issue. Apologies for not having worked on this btw, got caught up with work these past few months, so i'm adding to the bounty as i think it's a useful feature

larrykoubiak avatar Aug 04 '17 15:08 larrykoubiak

PR pushed here : https://github.com/libretro/RetroArch/pull/5244 Needs some ironing out, I'm a bit lost in GUI code.

rtissera avatar Aug 04 '17 18:08 rtissera

New PR pushed to properly mix MOD and core generated audio.

rtissera avatar Aug 08 '17 16:08 rtissera

Is this one considered okay ?

rtissera avatar Aug 11 '17 09:08 rtissera

Yes, I tested it and the mixing is performed correctly.

inactive123 avatar Aug 11 '17 12:08 inactive123

Let me close the issue so the bounty checkout can proceed.

inactive123 avatar Aug 11 '17 12:08 inactive123

Just fyi, and to amend what i wrote on bountysource, the mixing in core works, but you can't "run" it because ffmpeg isn't happy with it for some reason. Like i said, awesome work :1st_place_medal:

larrykoubiak avatar Aug 11 '17 15:08 larrykoubiak