Fix #1698: use OpenSL ES to reimplement libjsound.so, fix javax.sound audio on Android - #1700
Draft
razureink wants to merge 18 commits into
Draft
Fix #1698: use OpenSL ES to reimplement libjsound.so, fix javax.sound audio on Android#1700razureink wants to merge 18 commits into
razureink wants to merge 18 commits into
Conversation
…droid libjsound.so in JDK 25+ Android builds now links against libasound.so.2 (ALSA), which is not available on Android. This causes javax.sound operations to fail with UnsatisfiedLinkError. Changes: - Add minimal ALSA stub library (alsa_stub.c) that provides all the symbols libjsound.so needs, built with SONAME libasound.so.2 - Register ALSA stub in CMakeLists.txt so it gets compiled for all Android architectures and bundled in the APK - Update setUpJavaRuntime() in FCLauncher.java to load the ALSA stub before loading JDK libraries, ensuring libjsound.so can resolve its ALSA dependency - Skip libjsound.so in locateLibs() since it will be loaded lazily by the JVM when javax.sound is used, at which point the ALSA stub is already available
aaaapai
reviewed
Jul 24, 2026
| android | ||
| ) | ||
|
|
||
| # 仅在arm64-v8a架构下链接EGL和GLESv2 |
- Create jsound.c with full PortMixer JNI using OpenSL ES buffer queue - Add jsound target to CMakeLists.txt linking OpenSLES - Remove libjsound.so skip in locateLibs() in FCLauncher.java - Custom libjsound.so provides audio playback via OpenSL ES on Android - Fixes UnsatisfiedLinkError for javax.sound on JDK 25 without ALSA
…S to alsa_stub target
razureink
force-pushed
the
fix-issue-1698-jsound-alsa
branch
from
July 24, 2026 14:06
1138d7a to
69d38f7
Compare
razureink
force-pushed
the
fix-issue-1698-jsound-alsa
branch
from
July 24, 2026 14:46
5ae4ff6 to
386ba8e
Compare
…tAudioDeviceProvider, DirectAudioDevice)
razureink
force-pushed
the
fix-issue-1698-jsound-alsa
branch
from
July 27, 2026 00:02
d9ece1c to
e50fe70
Compare
razureink
force-pushed
the
fix-issue-1698-jsound-alsa
branch
from
July 27, 2026 01:23
e50fe70 to
81502dc
Compare
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.
之前方案是在 alsa_stub 里集成 OpenSL ES 做音频输出,但会和 jsound 冲突,而且 CI 也编不过去。
现在把 alsa_stub 改回纯桩实现,不干实际音频的事,只保证 libjsound.so 链接不报错。音频输出由新增的 libjsound.so 来处理,它直接走 OpenSL ES,不需要 ALSA。
改动: