commit 1135be4e747e78ff69254b00f92bd28b7b5af8c6 parent 976ed6cef310547cec0d036021d058babaf99ba3 Author: Jack Mordaunt <jackmordaunt.dev@gmail.com> Date: Fri, 22 Oct 2021 22:12:23 +0800 nativeaudio: writeup readme Signed-off-by: Jack Mordaunt <jackmordaunt.dev@gmail.com> Diffstat:
| A | README.md | | | 30 | ++++++++++++++++++++++++++++++ |
1 file changed, 30 insertions(+), 0 deletions(-)
diff --git a/README.md b/README.md @@ -0,0 +1,29 @@ +# nativeaudio + +`nativeaudio` is a convenience package that provides a Go interface over +native audio APIs. + +The resultant output should be PCM s16le playable directly and also by +github.com/hajimehoshi/oto. + +This package was inspired by the utter lack of audio decoders for AAC, +which it turns out is a closed codec that Windows and macOS have bought +licenses for. + +For the moment Windows is implemented via the Media Foundation, and +other platforms shell out to FFmpeg as a fallback. + +macOS bindings are expected to land relatively soon, however the other +platforms are left as an exercise to the community. + +`go get git.sr.ht/~jackmordaunt/nativeaudio` + +```go +package main + +import "git.sr.ht/~jackmordaunt/nativeaudio" + +func main() { + nativeaudio.Play("audio.m4a") +} +``` +\ No newline at end of file