sigrid/ft2play

Description
# ft2play
Direct, bit-accurate C port of FT2.09's XM replayer (SB16/WAV render mode). \
The project contains example code in the ft2play folder on how to interface with the API.

# Notes
- To compile ft2play (the test program) on macOS/Linux, you need SDL2
- This is <i>not</i> the same replayer/mixer code used in the FT2 clone (the FT2 clone also uses a port, but it has some audio precision improvements)
- The accuracy has only been compared against a few songs
- The code may not be 100% safe to use as a replayer in other projects, and as such I recommend to use this only for reference
- The mixing amplification is set to 4x per default (same value as FT2), and this is a bit low. I recommend calling <code>setAmp(10)</code> after <code>initMusic()</code>.

# How to test accuracy
1) Open FT2.08 or FT2.09 (use a fresh program start for every render) and load an XM/MOD module. Make sure "16-bit mixing", "Stereo" and "Interpolation" are enabled in the config screen
2) Save as WAV (Freq. = 44100, Amp. = 4)
3) Render the same song to WAV using ft2play (f.ex. "ft2play mysong.xm --render-to-wav")
4) Use a program capable of verifying the binary integrity between the two output files. If they differ, you found a problem and should create a new issue for this project on GitHub :)
Last 5 commits (shortlog)
Date Author Short message Commit hash
2021-03-02 Sigrid use actual frq when seeking 9f77a97152139c86ed8c86e8aa45060084314c66
2020-12-05 Sigrid print position when seeking 1933d1c0d5a61983615cb3a1ddcafa50874a2989
2020-12-05 Sigrid increase buffer size, add -s command line option 9976f6fa310e511273e5ed02c5c3ebca4af5c3da
2020-12-04 Sigrid mkfile: add common.h cea086da84e938d9396df9d250072ec956a125c6
2020-12-04 Sigrid more correct round() 46f9c39bf931494b7e2e3bdfbcdb17dae6ea599a
Files (browse)
LICENSE
README.md
audiodrivers/
common.h
ft2dec.c
ft2play/
mkfile
pmp_main.c
pmp_main.h
pmp_mix.c
pmp_mix.h
pmplay.c
pmplay.h
snd_masm.c
snd_masm.h
tables.c
tables.h