SDL-Mixer-X
SDL-Mixer-X copied to clipboard
Idea: organize file type detectors
For a better organizing, it's would be cool to move any format detectors into music_*.c as a helper function to make the file type detection process be more organized?
I mean something to like here: https://github.com/Wohlstand/OPL3BankEditor/tree/master/src/FileFormats
- every file format definition has a "detect()" call that tries to test a file is it's this format on aboard or not: https://github.com/Wohlstand/OPL3BankEditor/blob/master/src/FileFormats/ffmt_base.h#L35
- once format was confirmed "it's mine!", then, this format class is taking for a processing
This will improve scalability and allows easier adding of new file formats without of extra "music.c" hacking (to add more type detection codes into specific calls).