Commit graph

9 commits

Author SHA1 Message Date
Simon Bruder f9c0140100
Add documentation and tests for xact3::adpcm
This also renames variables to be easier to understand (rather than
copying the naming scheme of the spec) and moves the calculation of
computable fields in the wave format header into the adpcm module.
2020-07-05 21:17:42 +02:00
Simon Bruder 56d36f2732
Avoid truncation
Error where truncation can occurr and prevent truncation in the future
by using `type::from()` (which checks for truncation) instead of `as
type` (which doesn’t).
2020-06-27 19:43:50 +02:00
Simon Bruder 5a77d86fe7
Switch from nom to custom parser
The reason for the switch is mostly related to error handling (and me
being unable to unterstand how nom does it). Using byteorder and a few
handwritten helper functions for parsing makes error handling much
easier. It also allows me to return more helpful error messages.
2020-06-26 13:25:21 +02:00
Simon Bruder 2b0b66ddca
Use unwrap() for writing to cursor
Writing to cursors should never fail
2020-06-25 18:47:11 +02:00
Simon Bruder e921a150e1
Add error handling for unsupported audio formats 2020-06-25 00:04:10 +02:00
Simon Bruder 0c24fd0847
Better handling of anonymous sounds in wave banks 2020-06-23 20:16:51 +02:00
Simon Bruder a1ba24bc87
xact3::xwb: Number sounds when no names are found
This is a workaround as in the long run names should be read from the
corresponding sound bank.
2020-06-23 14:32:00 +02:00
Simon Bruder dbc42a4083
xact3::xwb: Log segment lengths for debugging 2020-06-23 13:19:19 +02:00
Simon Bruder 8319ee42d9
Initial commit 2020-06-22 20:39:20 +02:00