From cd42c773044b6b270df1abd26bcc29db6856f1c9 Mon Sep 17 00:00:00 2001 From: Alexander Capehart Date: Sat, 16 Dec 2023 16:33:54 -0700 Subject: [PATCH] playback: use ffmpeg first Always decode with ffmpeg before decoding with MediaCodec. MediaCodec is unreliable on some devices in such a way as to cause a full loading failure on them. Prevent this by using ffmpeg. --- CHANGELOG.md | 4 ++++ .../java/org/oxycblt/auxio/playback/system/PlaybackService.kt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b4cac8eb4..0dcca4f2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ - Albums linked to an artist only as a collaborator are no longer included in an artist's album count +#### What's Fixed +- Fixed certain FLAC files failing to play on some devices + + ## 3.2.1 #### What's Improved diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt index 15c8cf0eb..7ac1c66cf 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt @@ -121,14 +121,14 @@ class PlaybackService : // battery/apk size/cache size val audioRenderer = RenderersFactory { handler, _, audioListener, _, _ -> arrayOf( + FfmpegAudioRenderer(handler, audioListener, replayGainProcessor), MediaCodecAudioRenderer( this, MediaCodecSelector.DEFAULT, handler, audioListener, AudioCapabilities.DEFAULT_AUDIO_CAPABILITIES, - replayGainProcessor), - FfmpegAudioRenderer(handler, audioListener, replayGainProcessor)) + replayGainProcessor)) } player =