Repository navigation
audio: force mp3 on Onyx BOOX devices that cannot decode opus - #4036
Open
Mubashir78 wants to merge 1 commit into
Open
Mubashir78 wants to merge 1 commit into
Mubashir78 wants to merge 1 commit into
Conversation
Issue quran#4018. Onyx BOOX firmware 4.2 dropped native opus decoding in its Android runtime, so on those devices new downloads and streaming of opus audio are silently silent, while mp3 (which the same qaris expose) works. audioExtensionForQari() and allowedAudioExtensions() now only prefer or allow opus when the device is not an Onyx BOOX device. Detection reads Build.MANUFACTURER and is null-safe, so non-BOOX behaviour and existing unit tests are unchanged. Device-forced mp3 suggested by maintainer ahmedre in the issue thread. (cherry picked from commit 9fd45aa)
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.
Fixes #4018
Summary
Onyx BOOX firmware 4.2 dropped native opus decoding in its Android runtime, so on those devices new downloads and streaming of opus audio are completely silent, while mp3 from the same qaris plays fine. This was confirmed by the reporter: Basfar (mp3 only) works, Minshawi and Abdul Basit (opus for new downloads) fail.
This implements the device workaround suggested by @ahmedre in the issue:
QuranAudioExtensionDecidernow prefers and allows opus only on devices that are not Onyx BOOX. Detection readsBuild.MANUFACTURERwith a null-safe, case-insensitive comparison.Verification
Happy to adjust the detection if BOOX reports a different manufacturer value on some models.