MOD Music Support in MonoGame

Hi Guys,

I’m assuming there’s no MOD music playback support in MonoGame? I’ve just discovered the SharpMod C# player which appears to use NAudio for the sound (so should be compatible). I think it would be relatively easy to port this into the MonoGame framework (I need MOD support for my game). Before I do it, I was just checking that there is no solution for this already?

Should it go well, I’d be more than happy to release the changes for everyone.

Many thanks,

Damien.

Sharpmod support XNA audio renderer…

I need MOD support too :slight_smile:

Cool. Well I managed to port SharpMod into the latest copy of the MonoGame source code last night and can now play mods. I need to do some tidying up i.e. hide some of the complexities in a nice wrapper class.

Right now I have it working by adding the NAudio Nuget package, but it might be possible to modify the code to use something that ships with MonoGame. I thought MonoGame uses NAudio, but based on the libraries included in my Game it would appear not. Maybe someone can confirm? It may be that adding an NAudio reference is acceptable again if someone can confirm that would be great.

I also need to write a content pipeline for the modules so they can be included in the content project. This is not something I’ve done before, but I’ll see if I can figure it out.

I’ve only grabbed a copy of the source code so I’m not in a position to upload my changes in the repository. I’ll need to configure it to work with VS or send it to someone who can do that bit for me.

Cheers,

Damien

MonoGame uses XAudio for WindowsDX and OpenAL for DesktopGL. There’s no additional abstraction layer. NAudio can use a couple different native audio API’s, but only Windows stuff it seems.

SharpMod supports rendering through XNA’s DynamicSoundEffectInstance. I would suggest using this instead of NAudio. Give it a try and let us know if it works.