GP2X Playing .mod Files On Gp2x


plupp

Still Fresh
Joined
Jun 19, 2003
Messages
47
I used the search feature to find out if anyone here has asked this question before but I found no good info for the gp2x....

Has anyone here gotten a .mod playing library to work on the gp2x?

I would appreciate some help on this issue, preferably a working example or some code cut from a working project... this should be really simple since there are libraries available but I am not able to find a good starting point.

/plupp
 
Code:
  Mix_Music *music = NULL;
  if (Mix_OpenAudio(22050, AUDIO_S16, 2, 4096)) {
    puts("open audio failed!");
    exit(1);
  }
  music = Mix_LoadMUS("music.mod");
  if (!music) {
    puts("failed to load .mod");
    exit(1);
  }
  Mix_PlayMusic(music, -1);
Give that a try (it uses SDL_Mixer). Change the mod to something else supported by SDL_Mixer and it might also play (depends on what your version of SDL_Mixer was compiled to support). You might need to add something like -lmikmod into your makefile along with -lSDL_mixer, but I can't remember now if mikmod is needed or not.
 
Back
Top