sezero / mikmod

Mikmod Sound System (mirror of git repo at https://sf.net/projects/mikmod/)
http://mikmod.sourceforge.net/
69 stars 21 forks source link

Implement MODPlugin ADPCM4 support for MOD, S3M, IT modules. #61

Closed AliceLR closed 2 years ago

AliceLR commented 2 years ago

Follow up commit to #57. This adds support for ADPCM4 samples in MOD, S3M, and IT modules (the prior commit added a loader and support for XM only). I also cleaned up the ADPCM4 loader a little bit—it didn't need a malloc for 16 bytes, the declarations needed to be fixed to be ANSI C compliant, etc.

MOD test module: fairli.mod.zip S3M test module: mm2flash.s3m.zip XM test module: MRHPx-HBTN LUCiFER.xm.zip IT test module: another life.it.zip

sezero commented 2 years ago

In load_mod.c, q->seekpos was never set before: was it really not needed before this?

AliceLR commented 2 years ago

In load_mod.c, q->seekpos was never set before: was it really not needed before this?

I think the intention of how MikMod implements q->seekpos is roughly:

Because of the embedded ADPCM tags in MODs with this hack, they can't read without seeks like a regular MOD.

sezero commented 2 years ago

OK, thanks.