Skip to content

Equalizer broken in v1.10.1 #3241

Description

@faltiska

Version

Media3 main branch

More version details

I have an equalizer feature, in my app, that has been working for the past 2 years.
After updating androidx.media3:media3-exoplayer and androidx.media3:media3-session to 1.10.1

    def media3_version = '1.10.1'
    api "androidx.media3:media3-exoplayer:$media3_version"
    api "androidx.media3:media3-session:$media3_version"

equalizer.setBandLevel(band, level) either doesn't work or throws an exception.

I have tested on a Motorola Signature with Android 16, and it is broken, but it still works on an emulator with android 16.

I have reverted back to media3_version = '1.8.0' and it works fine on all my test devices.
Then I started incrementing the version to find which is the latest version that works and found that 1.10.0 is fine so the problem was introduced in 1.10.1

I create the equalizer with the same session Id with which I build the Exo Player.
I take the number of bands and the band range from the equalizer itself.
The first and second call to setBandLevel are not throwing an exception, but they also don't change the sound, the call seems to be a no-op. The next calls will throw this exception:

Failed to set the equalizer band 4 to level -22 
java.lang.RuntimeException: AudioEffect: set/get parameter error at android.media.audiofx.AudioEffect.checkStatus(AudioEffect.java:1465) at android.media.audiofx.Equalizer.setBandLevel(Equalizer.java:222) at [...]EqualizerActivity$EqBandChangeListener.onProgressChanged(EqualizerActivity.java:228) at 

Devices that reproduce the issue

Motorola Signature

Devices that do not reproduce the issue

Android Studio emulators

Reproducible in the demo app?

Yes

Reproduction steps

Create an equalizer attached to the same session used by an Exo Player, play a sound and try to call setBand on the equalizer (after or during the sound playback).

Expected result

Sound effect should be applied.

Actual result

Either setBand fails silently or throws the exception I pasted above.

Media

Any sound file.

Bug Report

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions