simple implementation of opus for godot (made for barkvr)
  • C++ 50%
  • GDScript 41.6%
  • Python 7.6%
  • C 0.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
zodiepupper ecbbfc817d
Some checks are pending
build-linux / compile-for-linux (push) Waiting to run
build-win / compile-for-windows (push) Waiting to run
Update README.md
2026-10-26 08:42:04 -07:00
.github/workflows Update build-windows.yml 2024-08-22 00:47:24 -06:00
.vscode in progress/testing 2023-11-11 12:13:12 -07:00
gdextensiontest added scons path for linking android opus, added android build steps to README.md 2024-09-10 01:55:17 -06:00
godot-cpp@9da1e0cee1 upd, testing 2024-08-08 00:00:06 -06:00
src messing around, encoded an image with opus 2024-07-02 03:29:39 -06:00
.gitattributes Initial commit 2023-02-27 13:46:01 -07:00
.gitignore updated gitignore 2024-08-11 16:47:40 -06:00
.gitmodules moved opus, fixed linking, should work now 2024-05-02 04:47:34 -06:00
.sconsign.dblite added scons path for linking android opus, added android build steps to README.md 2024-09-10 01:55:17 -06:00
LICENSE Create LICENSE 2024-06-23 13:36:55 -06:00
README.md Update README.md 2026-10-26 08:42:04 -07:00
SConstruct fixed mislabeled macos build path 2024-09-11 01:23:55 -06:00

gdopus

TLDR: run this to download and build the whole thing in one go: git clone https://github.com/zodiepupper/gdopus --recurse-submodules && cd gdopus/src/opus/ && mkdir build && cd build && cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. && cmake --build . && cd ../../../ && scons

To build, please follow the following instructions:

  • cd src/opus/ to get into the opus directory
  • look at the README to find what dependencies you need to install
  • mkdir build to create the build folder in src/opus/
  • run cmake -DCMAKE_POSITION_INDEPENDENT_CODE=ON .. to setup the cmake build files to build the static library
    • the flag -DCMAKE_POSITION_INDEPENDENT_CODE=ON tells the opus static library to compile in a way that is usable when being embedded in a shared library like a gdextension. this is the cmake equivalent to -fPIC
  • run cmake --build . to actually build the library file
  • once you've built opus, you should have a libopus file in src/opus/build/, if that's true then good job!
  • now you'll want to go to the project root and simply run scons (obviously you can also run scons with arguments, ex: apple silicon macs need to run it like this: scons platform=macos arch=arm64)
  • that should be it. it will build the gdextension and place the resulting lib in the test project's bin directory
    • you should be able to find the resulting gdextension in gdextensiontest/bin/ and it should start with libgdopusencoder

ANDROID

  • install android commandline tools for your platform using sdkmanager to get the latest version
  • cd src/opus; mkdir build-android; cd build-android
  • cmake .. -DCMAKE_TOOLCHAIN_FILE={$ANDROID_HOME}/ndk/23.2.858313/build/cmake/android.toolchain.camke -DANDROID_ABI=arm64-v8a
    • you can replace 23.2.8568313 with whatever version of the ndk got downloaded with the commandline tools thing
  • cmake --build . --config Release
  • cd to the root of the project (gdopus/)
  • scons platform=android

please keep in mind this is still in early development and will change in the future. right now this repo simply contains the most basic implementation of the opus library so I could use it for learning purposes and for a quick voip utility. future updates will flesh out the features, stay tuned.

If you're interested in supporting development consider submitting a PR or financailly supporting the barkvr project which this tool is being developed for: