stijnfrishert/libLSDJ

Future proof the instrument system

Closed this issue · 0 comments

  • Don't immediately parse instruments, just store their bytes and the format version
    • Storing the version allows us to reject/migrate instruments moving between songs of different formats.
  • Provide accessor functions to read data from an instrument.
    • These should be in the form bool lsdj_instrument_read_envelope(instr, char** envelope)
    • The fmt version can be used to branch
    • The result is put in an output parameter, which we can also fill with null if said setting doesn't exist for a given version
    • The function returns success/failure for easy if-statements