Skip to content

Getting started  #3

Description

@veso266

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions