libxmp is a software written in C to playback oldschool tracker (.it, .mod, etc.) files.
Sadly there is no (to my knowledge) software thats similar and has a permissive license written in C#.
So i made bindings.
Install any NAudio backend via nuget, use DirectSound (Windows only) or write your own IWavePlayer
backend. Then initialise the Xmp class with any IWavePlayer
backend. I.E:
using var xmp = new Xmp(new DirectSoundOut());
To play the file just call (for async):
var playtask = xmp.PlayAsync(path-to-file);
<some stuff>
await playtask;
or as blocking call:
xmp.PlayBlocking(path-to-file);
For name of the song and file-format call:
xmp.TestModule(path-to-file, out var testInfo);
And for duration call:
xmp.GetEstimatedTotalPlayTime(path-to-file);