Author Topic: Is the module mixer code portable?  (Read 3008 times)

Offline leeor_net

  • Shy artist
  • Posts: 6
Is the module mixer code portable?
« on: May 23, 2012, 14:17:50 »
I haven't yet looked too thouroughly into the code but I was wondering how portable the mixer engine's code is?

I've always liked the quality of MPT's mixer engine. I wanted to include it as part of an open-source game sdk and possibly as a stand-alone mixer library (ala libmodplug). As stated, however, I haven't looked into the source code much yet (just kind of glimpsed over some of the loading code) and I wanted to know I'd be up against before I started. Is it portable at all? I'm sure there are parts that will need to be rewritten to make it cross platform.

I've looked at libmodplug but it seems it hasn't seen any development since 2005... so far I haven't seen anything else that looked promising.

Finally, which part of the source tree could be considered the 'mixer engine' that could be wrapped up into a stand-alone library?

Thanks for your time.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,104
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Is the module mixer code portable?
« Reply #1 on: May 23, 2012, 14:22:18 »
We are working (slowly, but constantly) on splittup up the GUI and the playback library (aka libopenmpt). Splitting up will be done first, then, for platform independent code, the ASM code will have to be replaced by pure C++ implementations. Luckily most of those should already be available from libmodplug, so most of this stuff doesn't have to be translated back to C++. I cannot name a definite due date for this effort, though.

Quote
Finally, which part of the source tree could be considered the 'mixer engine' that could be wrapped up into a stand-alone library?
Everything related to sound processing, module loading etc. is located in the "soundlib" folder. The tracker implementation on the other hand can be found in the "mptrack" folder.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Offline leeor_net

  • Shy artist
  • Posts: 6
Re: Is the module mixer code portable?
« Reply #2 on: May 23, 2012, 14:42:51 »
Okay, that's what I figured. Thanks for your reply.

I've never been good with ASM so I doubt I'll be very useful when it comes to that... I'll take a look at libmodplug's code and see what I can do about getting something started and what kind of effort will be involved in making it work on other platforms as well.

I'll keep you posted.

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,104
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Is the module mixer code portable?
« Reply #3 on: May 23, 2012, 16:26:54 »
At least in the player core, I think only the ASM code (which can mostly be taken from libmodplug) is the only thing that keeps it from being multi-platform (which libmodplug already is). Of course there are many legacy data types used everywhere (DWORD, UINT, ...) but this can be "fixed" temporarily by adding the appropriate typedefs in libopenmpt,  rather than refactoring everything (which will be done at some point anyway).
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.