build: update prebuilt runtimes with ctl shim wrappers#52
Closed
katruud wants to merge 7 commits intoAvionBlock:masterfrom
Closed
build: update prebuilt runtimes with ctl shim wrappers#52katruud wants to merge 7 commits intoAvionBlock:masterfrom
katruud wants to merge 7 commits intoAvionBlock:masterfrom
Conversation
Replace stale native binaries with latest output from the OpusCompile workflow (run 24160669210). All platforms now include the non-variadic CTL shim wrappers (opussharp_*_ctl) needed to avoid OPUS_BAD_ARG on ARM64 Apple Silicon. Platforms updated: android (arm/arm64/x64/x86), iOS (xcframework), linux (arm/arm64/x64/x86), macOS (arm64/x64), windows (arm64/x64/x86).
Change DllImport from unconditional "__Internal" to "opus" on all platforms except iOS. "__Internal" requires static linking into GameAssembly.dylib, which Unity IL2CPP does not support for .dylib/.dll plugins — causing undefined symbol errors at link time on macOS and potentially other platforms. Using the named library "opus" lets Unity load the native plugin dynamically at runtime, matching the pattern used by other native plugins (e.g. rnnoise). iOS retains "__Internal" as it requires static linking via xcframework.
The CI-built Windows DLLs have no exported symbols because MSVC's linker does not export functions by default when creating a DLL from a static library without a .def file or __declspec(dllexport). Restore the working master copies which have a proper export table. The OpusCompile workflow needs a .def file or /EXPORT flags to produce valid Windows DLLs — tracked separately.
Member
using OpusSharp.Core;
IOpusEncoder encoder;
IOpusDecoder decoder;
//Decoder
#if UNITY_IOS && !UNITY_EDITOR
encoder = new Static.OpusEncoder(...);
decoder = new Static.OpusDecoder(...);
#else
encoder = new Dynamic.OpusEncoder(...);
decoder = new Dynamic.OpusDecoder(...);Can't you use the explicit static/dynamic imports with IL2CPP? None of them reference each other e.g. |
…ally The Static/Dynamic namespace split already handles platform differences — users should use Dynamic.OpusEncoder on non-iOS instead of preprocessor guards in StaticNativeOpus.
Contributor
Author
Change reverted and PR updated |
Contributor
Author
Replace win-arm64, win-x64, and win-x86 opus.dll binaries with output from the latest successful OpusCompile CI run to ensure all platforms include the ctl shim wrappers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
opussharp_*_ctlnon-variadic shim wrappersPlatforms updated
android (arm/arm64/x64/x86), iOS (xcframework), linux (arm/arm64/x64/x86), macOS (arm64/x64), windows (arm64/x64/x86)
Verification
Note
The previous DllImport change (
__Internal→"opus"on non-iOS) has been reverted — the existing Static/Dynamic namespace split already handles platform differences, so users should useDynamic.OpusEncoder/Dynamic.OpusDecoderon non-iOS platforms instead.