Fix FLAC playback in float output mode - #125
Merged
Merged
Conversation
|
| Filename | Overview |
|---|---|
| app/src/main/java/com/lostf1sh/pixelplayeross/data/service/player/AudioDecoderPolicy.kt | Adds output-mode-aware FLAC routing while preserving existing extension-only and platform-decoder behavior. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/service/player/DualPlayerEngine.kt | Captures the output mode once per player build and consistently applies it to decoder, sink, renderer, and audio-session configuration. |
| app/src/test/java/com/lostf1sh/pixelplayeross/data/service/player/AudioDecoderPolicyTest.kt | Expands decoder-policy coverage across output modes, including FLAC float routing and MIME-case handling. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Build ExoPlayer] --> B[Capture current output mode]
B --> C{FLAC with float output?}
C -- Yes --> D[Exclude platform FLAC decoders]
D --> E[Bundled FFmpeg renderer]
C -- No --> F{ALAC or MIDI?}
F -- Yes --> E
F -- No --> G[Preserve Media3 platform decoder order]
B --> H[Configure matching audio sink]
Reviews (1): Last reviewed commit: "Fix FLAC playback in float output mode" | Re-trigger Greptile
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.
FLAC playback can become distorted when 32-bit float output is enabled, as reported on the Galaxy S25 Ultra. Route FLAC through the bundled FFmpeg renderer in this mode so it decodes directly to float PCM. System Default and Direct retain the platform decoder order.
Capture the output mode when building each player so decoder selection stays consistent with its audio sink during mode changes. Add regression coverage for FLAC routing, MIME casing, and existing ALAC, MIDI, and AAC behavior across output modes.
Fixes #122.
Validation:
:app:compileDebugKotlinpassed.:app:testDebugUnitTestpassed: 592 tests, including 15 decoder-policy tests.:app:lintDebugfailed with 94 existing errors in files identical tomain: Media3 opt-in annotations inFadingPlayer.ktand translation/plural resource errors. None of the errors are in the changed files.