Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aerth/playwav
play a wav file using Golang, ALSA
https://github.com/aerth/playwav
alsa audio linux sound wav
Last synced: about 2 months ago
JSON representation
play a wav file using Golang, ALSA
- Host: GitHub
- URL: https://github.com/aerth/playwav
- Owner: aerth
- License: mit
- Created: 2017-03-23T02:21:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-07-09T16:55:05.000Z (about 2 years ago)
- Last Synced: 2024-06-29T03:33:16.320Z (3 months ago)
- Topics: alsa, audio, linux, sound, wav
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# playwav
## play a .wav file
* stuck with FormatS16LE for now (Little Endian 16, 2 bytes per sample)
* compilation adds requirements: CGO and some c libraries (ALSA)## playwav command
```go get -v github.com/aerth/playwav/cmd/playwav```## playwav library
```
import "github.com/aerth/playwav"// from file
playwav.FromFile("example.wav")```
## cool test with playwav command
```
for i in $(find /usr/ -name '*.wav'); do ./playwav $i; done
```## output of ldd for playwav command:
```
linux-vdso.so.1 (0x00007fff27fcf000)
libasound.so.2 => /usr/lib64/libasound.so.2 (0x00007f418a496000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f418a278000)
libc.so.6 => /lib64/libc.so.6 (0x00007f4189eb2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f4189ba9000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f41899a5000)
librt.so.1 => /lib64/librt.so.1 (0x00007f418979b000)
/lib64/ld-linux-x86-64.so.2 (0x000055ab41acf000)
```