I suggest a way to solve this by tweaking a bit Martin Fernandez' header format. The header currently is as such:
Code: Select all
char[5] Signature (must be ADLIB)
uint8 Version (must be 1 — this format has no other version)
char* Track name as a null-terminated string
char* Game name as a null-terminated string
byte Ignored unknown value, generally 1
uint32 Track length (if 0: until end of file or null instruction)
Code: Select all
char[5] Signature, unchanged
uint8 Version — 2
char* Track name, unchanged
char* Game name, unchanged
byte sample rate / 7 (so 40 for 280 hz, 80 for 560 hz, or 100 for 700 hz)
uint32 Track length, unchanged