https://github.com/kopera/erlang-alsa
Erlang Alsa (libasound2) bindings
https://github.com/kopera/erlang-alsa
alsa audio erlang erlang-alsa libasound2 linux mixer
Last synced: 2 months ago
JSON representation
Erlang Alsa (libasound2) bindings
- Host: GitHub
- URL: https://github.com/kopera/erlang-alsa
- Owner: kopera
- License: apache-2.0
- Created: 2019-12-10T15:53:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T11:38:31.000Z (almost 5 years ago)
- Last Synced: 2025-03-24T05:26:39.116Z (3 months ago)
- Topics: alsa, audio, erlang, erlang-alsa, libasound2, linux, mixer
- Language: C
- Size: 99.6 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# alsa
Erlang Alsa (libasound2) bindings.
The Alsa application allows for capture and playing audio through the Linux Alsa
interface.# Setup
You need to add `alsa` as a dependency to your project. If you are using `rebar3`,
you can add the following to your `rebar.config`:```erlang
{deps, [
{alsa, "0.2.3"}
]}.
```Also ensure that `alsa` is added as a dependency to your application, by updating
your `.app.src` file:```erlang
{application, my_app, [{applications, [
kernel,
stdlib,alsa % <- You need this in your applications list
]}
]}.
```# Usage
For usage please refer to the examples in the examples directory. You can also
test the examples directly from the shell:```
$ rebar3 shell
```And then, once inside the erlang shell:
```erlang
1> c("examples/alsa_example_pcm.erl").
{ok,alsa_example_pcm}
2> alsa_example_pcm:play("default", alsa_example_pcm:generate_noise(5000)).
ok
```