Skip to content

bartimaeusnek/csharp-libxmp-bindings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C# Bindings for libxmp

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.

Usage

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);

Special Thanks to the libxmp project, aswell as the ClangSharpPInvokeGenerator!

About

C# Bindings for libxmp

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages