Concentus Unity
Fork of Concentus for Unity, retargeted to.NET Standard 2.1. Portable C# implementation of the Opus audio codec.
模組介紹 作者原文
Concentus-Unity: Opus for Unity C#
This project is a fork of Concentus v2.2.2, retargeted to compile against.NET Standard 2.1, fixing a Span runtime incompatibility on Unity's modern Mono/CLR.
Concentus-Unity is an independent, unofficial fork. It is not affiliated with or endorsed by the original Concentus maintainers or by Unity Technologies; "Unity" in the name refers to compatibility with the Unity engine runtime.
This is a minimal retargeting fork, with no functional or API changes beyond what was required to compile under.NET Standard 2.1. Namespaces have been renamed from Concentus to ConcentusUnity to avoid assembly/namespace collisions when both the original Concentus and this fork are present in the same process.
Why this fork exists
If you've hit MissingMethodException referencing a Span-based method when using Concentus in Unity, this is why.
The original Concentus targets.NET Standard 2.0, which has no native Span support, so it relies on the System.Memory NuGet polyfill package instead. On runtimes that supply Span natively (such as Unity's modern Mono/CLR), this causes a type-identity mismatch between the polyfilled Span Concentus was compiled against and the native Span actually present at runtime, resulting in a MissingMethodException for any Span-based method, even though the method clearly exists in the assembly's metadata.
Retargeting to.NET Standard 2.1 resolves this: Span is supplied natively by the runtime with no polyfill involved, so the type identity matches consumers running on modern.NET/Mono runtimes.
Project status
This fork inherits its Opus implementation directly from Concentus v2.2.2, which itself is based on libopus master 1.1.2 (FIXED_POINT, with optional floating-point analysis) and includes a port of the libspeexdsp resampler. See the original Concentus repository for details on the upstream implementation, testing methodology, and performance characteristics. None of that work has been redone or re-verified independently for this fork; only the target framework and namespaces have changed.
License
This project is licensed under the same BSD-style license as the original Concentus project. See LICENSE for the full text and original copyright holders.
安裝與使用 安裝:BepInEx 外掛
- 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
- 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
- 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
- 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。
帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。