media icon indicating copy to clipboard operation
media copied to clipboard

Playback speed doesn't work on some devices with Audio Offload Enabled

Open pawelnuzka opened this issue 1 year ago • 0 comments

Version

Media3 1.2.1

More version details

No response

Devices that reproduce the issue

I could reproduce on Galaxy Z Fold.

Devices that do not reproduce the issue

Pixel 7, Samsung Galaxy Tab S6, Samsung S24

Reproducible in the demo app?

No

Reproduction steps

  1. Enable Audio Offload and set setIsSpeedChangeSupportRequired(true), example:
          ExoPlayer.Builder(this)
            .setLoadControl(builder.build())
            .build()
            .apply {
                trackSelectionParameters = this.trackSelectionParameters
                    .buildUpon()
                    .setAudioOffloadPreferences(
                        TrackSelectionParameters.AudioOffloadPreferences
                            .Builder()
                            .setIsSpeedChangeSupportRequired(true)
                            .setAudioOffloadMode(TrackSelectionParameters.AudioOffloadPreferences.AUDIO_OFFLOAD_MODE_ENABLED)
                            .build()
                    )
                    .build()
            }

  1. Set PlaybackParameters with playback speed != 1.0f

Expected result

Since setIsSpeedChangeSupportRequired(true) it should always enable playback speed and not throw an exception

Actual result

Media Session throws nonfatal exception parameters out of range, playback speed is not applied

Media

--

Bug Report

  • [X] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

pawelnuzka avatar Feb 20 '24 21:02 pawelnuzka