protected override void Dispose(bool disposing)
        {
            // Free the mod handle.
            LibModPlugNative.UnloadMod(modFileHandle);

            base.Dispose(disposing);
        }
        public LibModPlugReader(string fileName)
        {
            // Load the module file and get the handle to it.
            modFileHandle = LibModPlugNative.LoadFile(fileName);

            // Make the new wave format.
            waveFormat = new WaveFormat(44100, 16, 2);
        }
 public override int Read(byte[] buffer, int offset, int count)
 {
     // Read the samples into the buffer. Returns number of bytes read.
     return(LibModPlugNative.ModPlug_Read(modFileHandle, buffer, count));
 }