Releases: jstrait/wavefile
Releases · jstrait/wavefile
v0.4.0
- A brand new API, based on streaming. (The old API has been removed). Improvements due to the new API include:
- Reduced memory consumption, due to not having to load the entire file into memory. In practice, this allows the gem to read/write files that previously would have been prohibitively large.
- Better performance for large files, for the same reason as above.
- Ability to progressively append data to the end of a file, instead of writing the entire file at once.
- Ability to easily read and write data in an arbitrary format, regardless of the file's native format. For example, you can transparently read data out of a 16-bit stereo file as 8-bit mono.
- Automatic file management, similar to how
IO.open()
works.
- Ability to query format metadata of files without opening them, even for formats that this gem can't read or write.
- Support for reading and writing 32-bit PCM files.
- No longer supported: Reading PCM data as floating point and writing floating point as PCM.
v0.3.0
- New method
bits_per_sample=()
. Allows converting a file from 8-bit to 16-bit and vice-versa. - New method
num_channels=()
. Allows converting a mono file to stereo, and vice-versa. - New method
sample_rate=()
. Allows changing the sample rate of a file. - New method
duration()
. Returns a hash listing the playback time of the file. - New method
inspect()
. Returns a pretty-printed string listing metadata about the file. - More descriptive error messages are displayed when a file with an invalid format can't be opened.
- Files that have more than just a format and data chunk can now be opened.
v0.2.1
v0.2.0
- Added support for properly reading and writing stereo files. Files with more than 2 channels (such as surround sound) are supported as well.
- Added convenience methods
mono?()
andstereo?()
. - Can now pass
:mono
and:stereo
into thenum_channels
argument of the constructor, to allow for more readable code. - Added method
reverse()
. - Conversion of raw samples to normalized samples, and vice versa, is more accurate.