SharpMik
SharpMik copied to clipboard
Getting started
Hi do you think you could tell me simply how to play a mod or s3m file with this library
I've tried like this
ModPlayer.SetFixedRandom = true;
int result = 0;
int iterations = 0;
String modName = null;
DateTime startTime = DateTime.Now;
Module mod;
ModDriver.LoadDriver<NoAudio>();
ModDriver.MikMod_Init("");
mod = ModuleLoader.Load("Music1.mod");
modName = "Music1.mod";
int lookingForByte = -1;
int byteCount = 44; // wav header
DateTime loadTime = DateTime.Now;
ModPlayer.Player_Start(mod);
// Trap for wrapping mods.
while (ModPlayer.Player_Active() && iterations < 5000)
{
if (lookingForByte > 0)
{
int test = byteCount + (int)WavDriver.BUFFERSIZE;
if (test > lookingForByte)
{
Debug.WriteLine("Will fail on the next pass, at {0} byes in", (lookingForByte - byteCount));
}
}
ModPlayer.Player_HandleTick();
byteCount += (int)WavDriver.BUFFERSIZE;
iterations++;
}
but when I run the program I can't hear anything
Thanks for Anwsering and Best Regards