This post is going to be fairly long so expect a decent read. I’ve been working with Fmod Ex and testing out various module formats with not really good results (at least, compared to Fmod 3). Note that the music listed do work without flaw in Fmod 3.
Bug 1: Program crashes with certian XM’s
Some XM files will play for a bit then suddenly crash. I have uploaded a few of the XM’s I found which crash my “test” program, which is basically just a slightly modified version of your PlayStream example.
http://www.shawn64.com/shaltif/Fmod (the program is for win32)
All the files needed for testing are in that area. When you run the test program, it will show a dialog asking for a song. Select one of the ones given (I recommend nf-chill.xm). After playing for a bit, it will crash (for nf-chill, this usually happens around 1:23 or so). I’ve also noticed that the module file will sound off or play odd notes before hitting this crash in some cases.
Also included there is the source code, but it’s pretty much exactly like your playStream example (note, I use Dev-CPP, thus the “C style”). I’ve tried with Hardware and I’ve even tried increasing the number of software channels to over 512 to see if that was an issue, but still crashed at the exact same moment.
The output mode (be it DirectSound or WINMM) doesn’t seem to make a difference either. I will note that this “bug” appears to only be with the XM format, as I’ve tried hundreds of different files with only few XM ones causing problems (even my IT’s played fine).
Bug 2: Related to the first bug. Sometimes, XM files will crash randomly.
This one is probably related to the previous. I’ve noticed that some XM files will play for awhile (even loop a few times) before a random crash occurs. The reason I call this bug “random” is because even playing the same song again for the same amount of time as the last crash doesn’t seem to produce it. I’m not sure if it’s directly or indirectly releated to the previous, but I thought I point it out.
Bug 3: Modules that set speed to 0 causes song to…well, freeze
In the AWS_NEWS.xm file, at the very end a command F00 is given. This sets the speed/tempo to 0. Why the creator did this, I’m not sure. However, I just wanted to point out that when Fmod Ex hits this, it actually tries to stop, which gives the “broken record” effect. I would recommend either Fmod should just ignore this command, or stop a song when a speed of 0 is set by the module.
Bug 4: FMOD_LOOP_OFF and mods don’t always work?
This isn’t really new, as this same issue happens in Fmod 3. But using the loop off flag doesn’t always work for module files. I assume this is because the modules which “fail” this have a manual “move back to this pattern” command which causes the “loop”. I’m not sure if this one is fixable, except maybe make it where these type of commands are skipped/ignored when looping is off?
Bug 5: FMOD_TIMEUNIT_MS returns the same value (for getLength)?
Again, not really a bug (compared to Fmod 3), but something I would like to suggest. I’ve noticed you can now use this on module files to get a millisecond length. At the moment, you have this to some pre-determined length of around 1491 minutes or something. I was wondering, is there anyway to possibly actually add a length feature which gets a module’s file in time? I’ve seen various other “mod players” which have this feature. I’ve tried to calculate this myself, with little success…
Please post any comments, questions or other information you need. I’ll try to assist in anyway I can.
- Shaltif asked 13 years ago
Thanks for your time. Yes, 4 and 5 were more of “inconviences” than anything. I’ll check into using ACCURATETIME which I didn’t know worked for MOD’s (I just kinda assumed that was the old “MPEG_ACCURATE” used in Fmod 3)
ModPlug (which is the tracker I use to checked everything in) ignores speed settings when set to 00, so yes, I was hoping Fmod would follow this the same way.
Thanks again for clearing that up, and checking into the XM issue.
- Shaltif answered 13 years ago
No comments on the actual bugs, but from an old tracker musicians perspective I have to say that issues 3 and 4 aren’t really bugs but rather features of the mod / xm format. F00 indeed sets the speed to zero and this is an old trick to force player to stop and not loop the song no matter what player is used. Same goes for looping with forced jump commands – if the song is ment to be played always in a looping mode, this is a way to override player preferences on what happens when the song end is reached.
- melwyn answered 13 years ago
Please login first to submit.