Repository navigation
android: Add SBC codec for UV-Pro audio - #110
Merged
Merged
Conversation
The BTECH UV-Pro carries its audio over Bluetooth as 32 kHz mono SBC, and Android has no public SBC codec. Add a mono 8-subband encoder and decoder, ported from HTCommander's Apache-2.0 SBC code (which follows libsbc), with unit tests. Not used yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 15, 2026
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.
Part 1 of 3 for #62 (BTECH UV-Pro support). Base: e4c39bd.
Claude Code (Claude Opus 5.5) wrote this under my direction. I didn't write it and haven't reviewed it line by line, but I went through every change with Claude, I can explain what each part does, and I did all the hardware testing myself.
What
The UV-Pro sends its Bluetooth audio as SBC. Android doesn't let apps use its own SBC codec, so this adds a mono-only encoder and decoder in one file, with unit tests. Nothing uses it until PR 3.
License
Ported from HTCommander's SBC code (Apache-2.0, © Ylian Saint-Hilaire). The original notice is kept in the file header. Happy to add a third-party notice file if you'd like one.
Test
./gradlew :app:testDebugUnitTest passes, with no new warnings.
I cross-checked it against ffmpeg's SBC in both directions: 63–66 dB SNR.
Used on air in PR 3.