Commit graph

12 commits

Author SHA1 Message Date
DataHoarder 4421c708d1
Add support for setting and getting the ogg muxing delay
Some checks failed
continuous-integration/drone/push Build is failing
2022-07-20 12:04:58 +02:00
DataHoarder afe0cd7874
Support more than 8 channels, set audio application 2022-07-20 11:41:29 +02:00
DataHoarder 6cc027f24d Use libopusenc to encode stream, WiP: tests
Some checks failed
continuous-integration/drone/push Build is failing
2022-02-27 18:56:08 +01:00
DataHoarder c9b07c6bec Added +build comment
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-30 01:33:20 +01:00
DataHoarder 88633d8444 Updated go build options on files
All checks were successful
continuous-integration/drone/push Build is passing
2022-01-27 17:21:09 +01:00
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 f10c96b8f4 refactor: remove unnecessary callback passing
Since we now have a full function wrapper for libopusfile init anyway we
can directly pass the callback struct pointer from there, instead of
making it go through Go first.
2020-07-10 09:44:22 +01:00
Hraban Luyat 2a2b57e79d fix: wrap libopusfile init call for go test -race
Since go 1.14 the race checker includes an overzealous pointer checker.
It marks all conversions from uintptr to unsafe.Pointer as an error, but
in reality that's allowed as long as you never dereference the pointer
or do any arithmetic on it. The C compiler doesn't complain about this,
so we pass the uintptr value to C and convert it there, in a small
wrapper function.

See https://groups.google.com/g/golang-nuts/c/995uZyRPKlU for more
details.

Fixes hraban/opus#28
2020-07-10 09:40:35 +01:00
Hraban Luyat f08db0e111 docs: Update copyright notice 2020-07-09 17:23:21 +01:00
Hraban Luyat 2a9bee0958 Update all copyright to 2017 2017-01-11 00:33:51 +00:00
Hraban Luyat 0e63cf1b6c Change copyright headers to refer to AUTHORS file 2016-10-10 15:24:24 +01:00
Hraban Luyat 223a3b298c Move callbacks struct to C allocator, to be safe
I'm not sure if the Go pointer proposal has already been implemented,
but under the proposed restrictions allocating the callback struct in Go
and passing that pointer to a C function which keeps it after returning
is not allowed.

This patch allocates the struct in C and passes the pointer from Go to
C, which is fine.
2016-08-22 15:11:13 +01:00