Commit graph

17 commits

Author SHA1 Message Date
Randy Reddig 25a249fbd5 feat: build without libopusfile using go build tag
This patch introduces a new build tag `nolibopusfile` that conditionally
compiles out the code that imports `libopusfile`. This enables a static
binary build on Alpine Linux, which doesn’t have a static `libopusfile`.

Tests still work:

```sh
go test -tags nolibopusfile ./...
go test ./...
```

We could also have moved all libopusfile related code (i.e. Stream) into
a separate sub-package, but that would break backwards compatibility.
This feature is too unpopular to justify introducing a new major
version.

See also: https://github.com/hraban/opus/pull/24
2020-07-10 13:54:23 +01:00
Hraban Luyat f08db0e111 docs: Update copyright notice 2020-07-09 17:23:21 +01:00
Hraban Luyat ffc1be2bfb Err vars declared const, direct from preprocessor
Same as previous commit c490b1f
2018-03-11 18:45:21 +00:00
Hraban Luyat 6c08ee0d19 Update import path to pkg-config style
pkg-config --cflags always puts you in the opus/ directory where opus.h
directly lives. No need to prefix with opus/. That just happened to work
because it was symlinked into /usr/include/opus, but we don't need to
rely on that now that we're using pkg-config.

Based on Tobias Wellnitz's comment (hraban/opus#12)
2017-02-28 00:56:50 +00:00
Hraban Luyat 941fa898cf Remove obsolete constants 2017-01-11 00:03:01 +00:00
Hraban Luyat d19039546f Update copyright year to 2015-2017. 🎆 2017-01-01 23:36:24 +00:00
Hraban Luyat 88cfa972dc Deprecation comments more noticeable in godoc.org 2016-12-29 14:53:04 +00:00
Hraban Luyat 9a6d0a2f5f Explicit about when deprecated names are removed 2016-12-29 12:30:29 +00:00
Hraban Luyat d941087903 Export error type, CamelCase error names 2016-12-29 11:58:57 +00:00
Hraban Luyat 0e63cf1b6c Change copyright headers to refer to AUTHORS file 2016-10-10 15:24:24 +01:00
Hraban Luyat 10761f623b Make opus errors wrapped ints, expose names
Allows comparing error values by value instead of just by human readable
string.
2016-10-10 14:18:10 +01:00
Hraban Luyat 3bccc0a781 Copyright notice in all files 2016-08-14 23:33:23 +01:00
Hraban Luyat 3ae552961f Use pkg-config to link opus 2016-08-14 14:44:41 +01:00
Hraban Luyat e4014abb4a Update documentation, remove unused var 2015-07-13 18:36:20 +01:00
Hraban Luyat c692580f07 Access preprocessor defines from CGO
Hack involves assigning the preprocessor defines to const values and
then accessing those through CGO.
2015-07-13 17:15:26 +01:00
Hraban Luyat d7e886a76b Refactoring the tests, wip (but passing) 2015-07-12 10:22:25 +00:00
Hraban Luyat b568024252 (untested) libopusfile simple decoder API 2015-07-05 20:28:08 +01:00