Fast Tracker II has a file that comes with it that lists the xm format. It''s not very verbose though. I have attempted to write my own xm loader, but alas, it would crash when loading some, but not others, so I just gave up on it when I found ModPlug''s API (It can be found at castlex.com. But beware, the site is closing soon). I''ve written a mod streamer with DirectSound using the ModPlug API (even with some direct help from Olivier Lapicque himself, the creator of the ModPlug API and ModPlug Player), but it still doesn''t work quite good enough and skips quite often. If anyone would like to use my code as a starting point, I''d be more than up for handing it out. I know I''m just not doing something right, because the ModPlug API is the most acurate mod player around. There isn''t a single mod that I''ve found that won''t play on Mod Plug Player flawlessly. Anyway, enough rambling...
If you are looking for libraries that are already out there to use to play in your game projects or for whatever, then I suggest FMod. It supports mod/xm/it/s3m as well as other non-modular formats. Although so far, it doesn''t seem to have the best .it support, the .mod and .xm support work very well (haven''t tried s3m), and the API is so simple it hurts.
Tracker SDK's / API's
There is a companion document on Wotsit that lists a few important things that the original document overlooked...I''m currently working on an XM loader, but seeing as hwo it is my first real experiment with loading...well..anything, I''m having issues. Still, plodding along with much determination is getting me somewhere, but not as quickly as I would like
If you could email me your source, I would be grateful to learn from it. (jbohnertNOSPAM@uiuc.edu remove the nospam, of course)
If you could email me your source, I would be grateful to learn from it. (jbohnertNOSPAM@uiuc.edu remove the nospam, of course)
For those of you who asked and anyone else who wants it, I''ve just created a small visual c++ project that demonstrates the Mod Plug Player API. It can be found here (340kb). The problem that it has is that playback of the mod sometimes gets out of synch. I think maybe I''m doing something wrong with the notifications?
The demo uses DirectSound (I compiled with DirectX 8, but I think it should work with 7, possibly 6 or even 5) to stream the data that the Mod Plug Player spits out. Just make sure your compiler has lib and include paths set up correctly for the DirectX SDK. Also, this code will probably work with other compilers, but I don''t use anything else, so I''m not sure. Also, just so you know, when using the Mod Plug Player API you can zip up your mod files with winzip and rename them with a .mdz extension, and the Mod Plug Player API will unzip it internally before loading it. You will notice I am using a zipped xm file: "afterlife.xm.mdz".
Anyway, check it out and if you find out what I''m doing wrong, please let me know. Also if you have questions just post here or email me at gordonglas@hotmail.com
The demo uses DirectSound (I compiled with DirectX 8, but I think it should work with 7, possibly 6 or even 5) to stream the data that the Mod Plug Player spits out. Just make sure your compiler has lib and include paths set up correctly for the DirectX SDK. Also, this code will probably work with other compilers, but I don''t use anything else, so I''m not sure. Also, just so you know, when using the Mod Plug Player API you can zip up your mod files with winzip and rename them with a .mdz extension, and the Mod Plug Player API will unzip it internally before loading it. You will notice I am using a zipped xm file: "afterlife.xm.mdz".
Anyway, check it out and if you find out what I''m doing wrong, please let me know. Also if you have questions just post here or email me at gordonglas@hotmail.com
I have resolved the problem for you Gordon. The way you are handling your Messages is NOT the correct method and I have fixed the problem in regards to this. I have also commented the areas that I have fixed for you so that you can see what I have done and learn from those mistakes that you made.
Besides that, NICE JOB!
Please see your email for the corrected code.
Besides that, NICE JOB!
Please see your email for the corrected code.
Wow! That was quick! I didn''t think it would be that easy to fix. Daniel, you are a god! Thanks to you, all my hard work didn''t go down the drain!
I don''t know why I didn''t think to use a thread. I also didn''t realize I was waiting infinately within MsgWaitForMultipleObjects.
As for why the CPU usage was at 100%, that was just to sorta simulate playing a game while playing the mod (and hence the call to GameMain).
Btw, I noticed I left some Copyright msgs at the top of some of the files. Disregard them and use the source freely as you wish. You have written proof right here in this forum.
Thanks again Daniel! This has been my most useful post yet.
...cracks open a Hacker Pschorr, pours into glass, raises glass, says THANK YOU!! and takes a sip mmmmm..
I don''t know why I didn''t think to use a thread. I also didn''t realize I was waiting infinately within MsgWaitForMultipleObjects.
As for why the CPU usage was at 100%, that was just to sorta simulate playing a game while playing the mod (and hence the call to GameMain).
Btw, I noticed I left some Copyright msgs at the top of some of the files. Disregard them and use the source freely as you wish. You have written proof right here in this forum.
Thanks again Daniel! This has been my most useful post yet.
...cracks open a Hacker Pschorr, pours into glass, raises glass, says THANK YOU!! and takes a sip mmmmm..
My Pleasure Gordon, I am glad that I was a beneficial help to you
My Thank You to you Gordon for the usuage of your code
If you would like a copy of the code when im done optimizing it, please let me know and I will send to you when completed.
Many Thanx Again!!
My Thank You to you Gordon for the usuage of your code
If you would like a copy of the code when im done optimizing it, please let me know and I will send to you when completed.
Many Thanx Again!!
That would be awesome if you could send me the optimized code when you are finished!
Thanks again!
Thanks again!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement