Skip to content

Commit

Permalink
playback: use ffmpeg first
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
OxygenCobalt committed Dec 16, 2023
1 parent bf1cbad commit cd42c77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit cd42c77

Please sign in to comment.