Comments (4)
Thank for you answer my question. I got it . I will continue research how to cross compiling CGO.
if i get some advancement, i will write down it.
from opus.
你好 :)
I've never tried this, but from what I understand CGO is disabled for cross compiling:
The cgo tool is enabled by default for native builds on systems where it is expected to work. It is disabled by default when cross-compiling. You can control this by setting the CGO_ENABLED environment variable when running the go tool: set it to 1 to enable the use of cgo, and to 0 to disable it. The go tool will set the build constraint "cgo" if cgo is enabled. The special import "C" implies the "cgo" build constraint, as though the file also said "// +build cgo". Therefore, if cgo is disabled, files that import "C" will not be built by the go tool. (For more about build constraints see https://golang.org/pkg/go/build/#hdr-Build_Constraints).
You'll need to figure out how to make pkgconfig work for cross compilation, as well, since this opus wrapper relies on pkgconfig to find the header files and libraries to link to.
All in all, this won't be easy. If you do succeed, let me know :) I can add the instructions to the README.
I'm closing this ticket because cross compiling CGO is a separate problem from what this package tries to solve.
Good luck!
from opus.
(some background info for clarity: this package , github.com/hraban/opus, is just a GO ↔ C translation layer. The real opus work is done by libopus, a library written in C and maintained by xiph.org. Cross compiling Go is easy, but cross compiling CGO means you need to cross compile the libopus header files as well, so you'll need a cross compiling C compiler. That's why this is tricky.)
from opus.
Let me know if you make it work. I'd love to add a section to the README about it.
from opus.
Related Issues (20)
- transfer pcm to opus HOT 2
- run error HOT 2
- Forward error correction flag in decode (decode_fec flag) HOT 9
- How to find sample rate of a stream? HOT 2
- How can I play opus codec audio by using portaudio? HOT 1
- Opus 1.3 release,would we update to new version? HOT 1
- There is a difference between an opus stream (which is an ogg/opus stream) and raw opus data. .opus files are really .ogg files with opus data, which this package doesn't provide a way to write. It does have a reader for it (Stream type), but no writer yet (never bothered to because I haven't needed it so far, but feel free to submit a PR). HOT 2
- transfer pcm to raw opus HOT 7
- "checkptr: unsafe pointer arithmetic" when using go race detector HOT 1
- Inconsistent types in README HOT 1
- encoder: invalid argument HOT 1
- Amplify ogg stream? HOT 2
- Byte slice to int16 slice. HOT 2
- How to destroy en(de)coder state? HOT 2
- Get audio from microphone and encode to ogg HOT 1
- Strange distortion when decoding HOT 6
- implicit declaration of function 'OPUS_GET_IN_DTX' HOT 8
- wasm env HOT 2
- Question: is it possible to build against libopus v1.5.(2) to be able to use the new features #108 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opus.