Riffola
Riffola - Reading extended RIFF files
Getting Started
Prerequisites
You just need to have Ruby installed.
Installing
Riffola installs as any Rubygem, either using gem
command or Bundler.
gem install riffola
Or using Bundler, add this in your Gemfile
and issue bundle install
.
gem 'riffola'
Once the gem is installed you can require its main library in your Ruby code and use its API:
require 'riffola'
chunks = Riffola.read 'my_file.wav'
RIFF format
Riffola considers a RIFF file as a list of chunks having the following structure:
- A 4 bytes header
- An encoded data size (on 4 or 2 bytes)
- An optional header
- Data of the given encoded data size
It gives ways in the Riffola.read
method to specify different chunks formats (with header size, a correction on the data size in case it is wrongly encoded...).
Check the Riffola.read
method description to get a grasp on the possible options given by the API.
Among the file formats it should be able to parse, there are WAV, AVI, ESP.
Running the tests
Executing tests is done by:
- Cloning the repository from Github:
git clone https://github.com/Muriel-Salvan/riffola
cd riffola
- Installing dependencies
bundle install
- Running tests
bundle exec rspec
Coding style tests
Rubocop is used for coding style tests.
bundle exec rubocop
Deployment
Like any Rubygem:
gem build riffola.gemspec
Contributing
Please fork the repository from Github and submit Pull Requests. Any contribution is more than welcome! :D
Versioning
We use SemVer for versioning.
Authors
- Muriel Salvan - Initial work - Muriel-Salvan
License
This project is licensed under the BSD License - see the LICENSE file for details