-
Notifications
You must be signed in to change notification settings - Fork 26
Document dumb_*_mod* restrict_ parameter more thoroughly and avoid magic numbers #53
Comments
I've added enum parameters for this. |
What should we pass as The old pattern counting looks like backwards compatibility for uncommon |
0 is fine as long as you're okay with possibly invalid data being treated as a NST module, which has no identifying signature. I tend to write frontend software so it only tries MOD without that flag if the file has one of the known MOD filename extensions. |
Thanks! Allegro 5 has always dispatched by filename extension even before calling DUMB. That's because Allegro 5 must decide which library to call in the first place. I've keep this behavior of calling different Do NST files always have |
NST have unknown extensions, sometimes .MOD. Feel free to use restrict_ = 0 in any case. I only do not, since I have encountered renamed modules before, and in one case, a module that was packed in an LHA archive. |
Okay, I'll use 0 then for both Interesting that the naming didn't standardize. Then yeah, you have to offer this choice to guarantee optimal playback, because not even a default can catch all cases. (On first sight, it looked like Thanks for the insight! |
Note that the any reader passes anything that fails the other reader checks into the MOD reader. Just in case something proves to be a false positive for the other signature checks. Too many possible signatures to check for MOD files. |
I suggest to leave this open until we have some of the content of those comments here as documentation in the code as well. |
Yes, this Maybe even define default arguments in DUMB 2.1? Ideally, the lib decides everything for you unless you explicitly want more control. |
dumb_read_mod_quick has gained a new argument "restrict". See kode54/dumb#53 for more details.
The
restrict_
parameter could be documented better and one should probably avoid magic numbers and instead either define an enum or preprocessor-constants for the two values.The text was updated successfully, but these errors were encountered: