Mod Archive Forums

Music Production => MilkyTracker => Tracking => MilkyPlay => Topic started by: Hakan on April 12, 2013, 22:06:01

Title: Trying to play module with milkyplay code...
Post by: Hakan on April 12, 2013, 22:06:01
Hello!

I am trying to play xm modules with milky player source code using AudioDriver_SDL.
Code runs well but i cant hear a sound. I think i am doing something wrong or missing something to call. I have windows7 64bit and use Mingw to compile my code.

Please help!

Code: [Select]
AudioDriver_SDL driver;
PlayerGeneric player(44100, &driver);
XModule mod;
char filename[] = "mymodule.xm";
if (mod.loadModule(filename,true)<0) {
    printf("Cant load module\n");
    return -1;
}
if (!mod.isModuleLoaded()) {
    printf("Module is NOT loaded!\n");
    return -1;
}
if(player.startPlaying(&mod)<0)
{
    printf("Cant start playing!\n");
    return -1;
}

Thanks for help and this great tracker!
Title: Re: Trying to play module with milkyplay code...
Post by: Hakan on April 14, 2013, 11:59:21
Hi again!

I've solved the problem.  ;D
It caused because of bufferSize. Somehow it sets to zero while playing.
I've set it to 2048 and bingo i have a little mod player now.  :)

Thanks again to the developers of this cute tracker...