v2.0.0
It's been a long time coming, but (drumroll...) today marks the official release of libLSDJ v2.0.0. Huzzah!
So, what warrants the new version number?
Version 1 served it's purpose pretty well, but as time went on it became clear the design of the library was prone to produce erratic save files whenever LSDJ itself was updated. The new v2 library (and tools) solve this, among several other things:
- Song bytes are read, stored and written in their entirety (0x8000 bytes), instead of immediately parsing them to sensible data. This way the library guarantees that whenever you read and write something back, you're working with exactly the same set of byte values.
- All song data setter/getter functions (for instruments, phrases, tables, etc.) are rewritten to read/write into the above 0x8000 byte structure and check for format version changes.
- Disclaimer: when e.g. LSDJ adds new features I need to add new setters/getters as well, but even if I don't, your song data stays intact.
- Song data setter/getters are up to date with LSDJ 8.3.4, including tempo's > 255, drum max, cmd/rate and more.
- Only thing missing for now are ADSR setter/getters, but none of the current tools use that.
- Import and export tools no longer read/write song data. They just compress/decompress projects, which lessens the chance of error even further.
- A test suite, to verify I'm not making any errors. Yes, libLSDj now checks against actual LSDj save files!
- All libLSDJ functions that allocate now take an optional
lsdj_allocator_t*
. You can provide your own memory (de)allocation. This makes libLSDJ usable in embedded environments. - Rewrote the error reporting mechanism to not malloc anymore (ties in with the previous point).
- Ditched Boost dependency in favour of two header-only libraries (makes building easier).
- Checking for
rb
flag on three locations now (decided to in consulation with Johan Kotlinski). - A couple of small bug fixes in the tools themselves.