Skip to content

iOS headphones with playback detection - #52

Merged
MisterGatto merged 2 commits into
skyprotocol:osp-masterfrom
HugeFrog24:feature/other-audio-headphones
Oct 17, 2026
Merged

MisterGatto merged 2 commits into
skyprotocol:osp-masterfrom
HugeFrog24:feature/other-audio-headphones

Conversation

@HugeFrog24

Copy link
Copy Markdown
Contributor

Play music in another app and your avatar wears headphones. Other players will see it too.

Usage: Settings > General > "Headphones while listening", then restart Sky and play music in Spotify or any other app.

Supported: 0.34.0 to 0.35.1. Future versions should, in theory, work (runtime decoder, no hard-coded offsets). If a future build ever doesn't match, the feature simply stays off.

Disabled by default, device-tested.

Phones that can't report other apps' audio show "Not supported on this device".

file(GLOB) without CONFIGURE_DEPENDS is only evaluated at configure time, so a build with an existing app/.cxx silently leaves out newly added .cpp files and the APK fails at runtime with UnsatisfiedLinkError. CONFIGURE_DEPENDS re-checks the glob on every build (CMake 3.12+, this build uses 3.22.1).
In the TGC Android build the native SystemIO check for other audio is a stub that always returns false, so the TuneBand headphones and the music-bus fade never trigger. Like the NetEase build, Canvas now answers it from Java: an AudioPlaybackCallback reports active USAGE_MEDIA players, not counting Canvas's own ExoPlayer, once a USAGE_GAME player has been seen; otherwise the device is reported unsupported.

The native side (Core/OtherAudio) locates the headphones update, SystemIO and the slot by instruction shape with no per-build offsets, refuses and logs on any mismatch, and answers only the headphones call site, so FMOD init and recording are unchanged.

Launcher setting in General, off by default, with a not-supported line on the row; strings in all locales. Host tests in app/src/test/cpp use fixtures from real 0.33.8 to 0.35.1 images; set OTHER_AUDIO_IMAGES to scan full libBootloader.so files.
@MisterGatto
MisterGatto merged commit 440a7a7 into skyprotocol:osp-master Oct 17, 2026
1 check failed
@HugeFrog24
HugeFrog24 deleted the feature/other-audio-headphones branch October 17, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants