Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mjago/soundfile
libsndfile bindings for the Crystal Language
https://github.com/mjago/soundfile
crystal libsndfile sound sound-files
Last synced: about 1 month ago
JSON representation
libsndfile bindings for the Crystal Language
- Host: GitHub
- URL: https://github.com/mjago/soundfile
- Owner: mjago
- License: mit
- Created: 2017-01-09T22:19:38.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T02:44:53.000Z (almost 4 years ago)
- Last Synced: 2024-06-21T23:41:12.113Z (6 months ago)
- Topics: crystal, libsndfile, sound, sound-files
- Language: Crystal
- Homepage:
- Size: 337 KB
- Stars: 7
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - soundfile - Bindings for [libsndfile](http://www.mega-nerd.com/libsndfile/) library (C bindings)
- awesome-crystal - soundfile - Bindings for [libsndfile](http://www.mega-nerd.com/libsndfile/) library (C bindings)
README
[![Build Status](https://travis-ci.org/mjago/soundfile.svg?branch=master)](https://travis-ci.org/mjago/soundfile)
# soundfile
Crystal extension for the [libsndfile](http://www.mega-nerd.com/libsndfile/) _soundfile manipulation_ library
## Installation
Add this to your application's `shard.yml`:
```yaml
dependencies:
soundfile:
github: mjago/soundfile
```## Usage
```crystal
require "soundfile"
include SoundFile
```### Read and write files
```crystal
SFile.open("read.wav", :read) do |sf_in|
ptr = Slice.new(sf_in.size, Int32.new(0))
sf.read_int(ptr, sf_in.size)SFile.open("write.wav", :write, sf_in.info) do |sf_out|
sf_out.write_int(ptr, sf_in.size)
end
end
```See [specs](https://github.com/mjago/soundfile/blob/master/spec/soundfile_spec.cr) and [libsndfile](http://www.mega-nerd.com/libsndfile/) for further usage
## Dependencies
1. [libsndfile](http://www.mega-nerd.com/libsndfile/)## Development
TODO: Write development instructions here
## Contributing
1. Fork it ( https://github.com/mjago/soundfile/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request## Contributors
- [mjago](https://github.com/mjago) - creator, maintainer