subsonic-tui/vendor/github.com/gopxl/beep
Sagi Dayan 26e526f07e
initial commit
Signed-off-by: Sagi Dayan <sagidayan@gmail.com>
2024-02-20 19:10:14 +02:00
..
mp3 initial commit 2024-02-20 19:10:14 +02:00
speaker initial commit 2024-02-20 19:10:14 +02:00
buffer.go initial commit 2024-02-20 19:10:14 +02:00
CHANGELOG.md initial commit 2024-02-20 19:10:14 +02:00
compositors.go initial commit 2024-02-20 19:10:14 +02:00
ctrl.go initial commit 2024-02-20 19:10:14 +02:00
interface.go initial commit 2024-02-20 19:10:14 +02:00
LICENSE initial commit 2024-02-20 19:10:14 +02:00
mixer.go initial commit 2024-02-20 19:10:14 +02:00
README.md initial commit 2024-02-20 19:10:14 +02:00
resample.go initial commit 2024-02-20 19:10:14 +02:00
streamers.go initial commit 2024-02-20 19:10:14 +02:00

Beep

GoDoc Go build status Coverage Status Go Report Card Discord Chat

A little package that brings sound to any Go application. Suitable for playback and audio-processing.

go get -u github.com/gopxl/beep

Features

Beep is built on top of its Streamer interface, which is like io.Reader, but for audio. It was one of the best design decisions I've ever made and it enabled all the rest of the features to naturally come together with not much code.

  • Decode and play WAV, MP3, OGG, and FLAC.
  • Encode and save WAV.
  • Very simple API. Limiting the support to stereo (two channel) audio made it possible to simplify the architecture and the API.
  • Rich library of compositors and effects. Loop, pause/resume, change volume, mix, sequence, change playback speed, and more.
  • Easily create new effects. With the Streamer interface, creating new effects is very easy.
  • Generate completely own artificial sounds. Again, the Streamer interface enables easy sound generation.
  • Very small codebase. The core is just ~1K LOC.

Tutorial

The Wiki contains a handful of tutorials for you to get started. They teach the fundamentals and advanced topics alike. Read them especially if you call speaker.Init every time you play something.

Examples

Speedy Player Doppler Stereo Room
Speedy Player Doppler Stereo Room

Dependencies

For playback, Beep uses Oto under the hood. Check its requirements to see what you need to install for building your application.

Running an already built application should work with no extra dependencies.

License

MIT

Projects using Beep