9 stable releases
4.0.1 | Oct 12, 2021 |
---|---|
4.0.0 | Feb 11, 2021 |
3.0.0 | Feb 7, 2021 |
2.5.0 | Aug 26, 2020 |
#467 in Audio
1.5MB
346 lines
RIFFU
The Resource Interchange File Format (RIFF) is a generic file container format for storing data in tagged chunks. It is primarily used to store multimedia such as sound and video, though it may also be used to store any arbitrary data.
Crate for doing IO on RIFF-formatted files
This crate provides utility methods for reading and writing formats such as Microsoft Wave, Audio Video Interleave or Downloadable Sounds.
Examples
Please see the tests to see how to use it.
TODO
I plan to add many, many features to this crate. I hope it will become the de facto way to parse RIFF files in Rust :) -- one can dream.
I am planning on working on:
-
Complete propagation of errors. A library ought to never panics. Every possible errors should propagate back to the user of this library inRiffError
. This also means thatRiffError
needs to be a LOT more robust. -
Ability to dynamically construct RIFF files and write to the machine. -
A clean implementation of the lazy version. Because a typeT
that satisfyRead + Seek
must be mutable to do anything. Getting this to work nicely is quite hard because only 1 mutable reference toT
can exist at any one time. However, because we are recursively parsing through the file, it complains that it cannot infer the lifetime ofT
. -
Unify the interface of the 2 versions under a trait.
-
Conversion from each of these representations.
Note
This is a fork of the original library with major changes (practically a rewrite of the entire thing). Provides a cleaner interface, and an option to read the file eagerly.