Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/TamasSzekeres/asound-cr
ALSA/libasound bindings for sound programming in Crystal language.
https://github.com/TamasSzekeres/asound-cr
alsa asound audio crystal sound
Last synced: about 1 month ago
JSON representation
ALSA/libasound bindings for sound programming in Crystal language.
- Host: GitHub
- URL: https://github.com/TamasSzekeres/asound-cr
- Owner: TamasSzekeres
- License: mit
- Created: 2017-05-12T19:09:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-20T17:58:04.000Z (about 7 years ago)
- Last Synced: 2024-08-01T17:32:08.377Z (4 months ago)
- Topics: alsa, asound, audio, crystal, sound
- Language: Crystal
- Homepage:
- Size: 76.2 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - asound-cr - Bindings for ALSA/libasound (C bindings)
- awesome-crystal - asound-cr - Bindings for ALSA/libasound (C bindings)
README
# asound-cr
ALSA/libasound bindings for sound programming in Crystal language.
[![Build Status](https://travis-ci.org/TamasSzekeres/asound-cr.svg?branch=master)](https://travis-ci.org/TamasSzekeres/asound-cr)
## Installation
First install shared libraries and other development files:
```bash
sudo apt-get install libasound2 libasound2-data libasound2-dev
```Add this to your application's `shard.yml`:
```yaml
dependencies:
asound:
github: TamasSzekeres/asound-cr
branch: master
```
Then run in terminal:
```bash
crystal deps
```## Usage
```crystal
require "asound"module YourModule
include ALSA
end
```For more details see the sample in [/sample](/sample) folder.
## Sample
Build and run the sample:
```bash
mkdir bin
crystal build -o bin/play-wav sample/play_wav.cr --release
```
*Usage*
```bash
./bin/play-wav
```*Example*
```bash
./bin/play-wav /usr/share/sounds/alsa/Front_Center.wav 44100 1 2
```## Contributing
1. Fork it ( https://github.com/TamasSzekeres/asound-cr/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
- [TamasSzekeres](https://github.com/TamasSzekeres) Tamás Szekeres - creator, maintainer