Author Topic: Including C headers/libraries  (Read 2060 times)

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Including C headers/libraries
« on: 2015-Apr-06 »
Can I use header files and just use C source files with my game? In particular, I want to support a large array of music formats in my game. The FMOD DLL included with the examples folder does not play MOD files accurately... there's no echo, and it sounds pretty lame compared to an actual mod/xm/it player. Erico stated that GLBasic supports MOD/IT 'out of the box' but PLAYMUSIC is doing nothing with those... I don't know if I'm doing it wrong. Anyway, is it possible to statically link FMOD or something similar? I just want to be able to have my game play tracker music. as it is, it's using the examples-folder fmod 3.75 dll but the sound quality is just off. Help?

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3918
    • View Profile
    • Space Fractal
Re: Including C headers/libraries
« Reply #1 on: 2015-Apr-06 »
Echo (if Its reverb thing you thinking on?) effect was newer standard in .xm and .mod files. I'm so thinks only .it might have that effect and snes format could uses it.

Om android its uses mikmod so and is included, make sure so full path to the music.
« Last Edit: 2015-Apr-06 by spacefractal »
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: Including C headers/libraries
« Reply #2 on: 2015-Apr-06 »
Has anyone wrapped bass.DLL? I feel like that would solve my problems. The mod files in FMOD do not loop in GLBasic... I need chiptunes and looping :(

Offline Darmakwolf

  • Dr. Type
  • ****
  • Posts: 343
  • Aoooooooo - the werewolves of London!
    • View Profile
Re: Including C headers/libraries
« Reply #3 on: 2015-Apr-06 »
Well I guess I've come to a conclusion actually. FMOD *does* do what I need. I just need to:

*Not use XM files, because it doesn't reverb them properly.
*Play the music beforehand to determine if it has an internal pattern jump at the end. 99% of them do, the particular one I was using for the shop does NOT, so it was frustrating me. But now that I know mod/it music can loop I'm happy.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4329
    • View Profile
    • FUED
Re: Including C headers/libraries
« Reply #4 on: 2015-Apr-06 »
Nice! So problem is solved. :)
If you are using .mod, you could possibly open it on an editor like madtracker or milkytracker and add the loop if one music is a must, right?

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3918
    • View Profile
    • Space Fractal
Re: Including C headers/libraries
« Reply #5 on: 2015-Apr-06 »
Im have created various XM and MOD files, most XM files.

XM and MOD files does NOT contains a reverB effects at all. Its a effect added by the player, but have newer been a part of either formats at all originally, so its can also sound wierd for some tunes. So that why its not automatic added to the tunes.

MOD files have the big drawback, they was orignally 2 channels left and 2 channels right (4 channel total), so there might require some added stereo interpolation to sound right on PC. FMod might do that automatic to sound better on PC.

For force looping you can add by using D00 and B00 commands end of the song, or alternative checking by yourself if the music is ended, then restart it.
Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation and The beagle Jam.