Visitar URL original
Equalizer broken in v1.10.1 · Issue #3241 · androidx/media · GitHub
Skip to content

Equalizer broken in v1.10.1 #3241

Closed
Closed

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

Activity

  1. microkatz commented on Jun 5, 2026

    @microkatz
    Contributor

    @faltiska

    Thank you for reporting your issue. There were bugfixes since the 1.8 release related to audio session id generation and usage.

    Firstly, it would help if you would be able to send a bug report. Make sure to set up debug logs before reproducing the scenario and recording the traces, https://developer.android.com/media/media3/exoplayer/debug-logging. If you cannot send the report publicly, please send them to android-media-github@google.com with the subject Issue #3241. Please also update this issue to indicate you've done this.

    Secondly, have you tried with additional devices? And what SDK levels? If its not working on the Motorola device but is on the emulators, Pixels etc then it could be a device specific issue. Perhaps there is some issue with that device with setting custom audio session ids. Maybe you need to wait until an audio session id is provided by the AudioTrack/Android Framework and then use that for the Equalizer as a workaround.

  2. faltiska commented on Jun 5, 2026

    @faltiska
    Author

    I probably added too much info to the bug.
    The problem is not in 1.8.0, it is in 1.10.1.

  3. microkatz commented on Jun 8, 2026

    @microkatz
    Contributor

    @faltiska

    It was well understood that you are seeing a regression after upgrading. I was just noting that there were code changes related to audio session id generation and usage after 1.8.0 but not sure what could be the culprit. Hence why I am asking for the additional materials from you.

    Can you please provide the bug report as well as answer the questions asked?

  4. faltiska commented on Jun 8, 2026

    @faltiska
    Author

    I am sorry but I will not be able to reproduce the problem on a Motorola phone anymore so I will not be able to give you any additional info.

    But the fact that it worked with 1.10.0 and it was broken in 1.10.1 may help you narrow it down.

  5. microkatz commented on Jun 9, 2026

    @microkatz
    Contributor

    @faltiska

    Noted. Thank you for specifying the version.

    It is most likely a symptom of the fix to the audioSessionId generation in 1.10.1 that has introduced a race condition. An interleaving of the updates to the Renderers via the Playback thread is causing the auto-generated value to be used rather than your session id.

    I'm implementing a fix and will update this thread when it has been submitted.

    In the meantime, you could just use the autogenerated audio session id provided by ExoPlayer for the Equalizer instead of creating your own. Or you can wait till its been created and then set your custom value via setAudioSessionId.

  6. faltiska commented on Jun 9, 2026

    @faltiska
    Author

    Thank you!!

  7. microkatz commented on Jun 11, 2026

    @microkatz
    Contributor

    @faltiska

    We have pushed a fix to the issue in the main branch in this commit: b8fee01.

    Please let us know if that addresses the problem or if you have any additional questions.

  8. microkatz commented on Jun 16, 2026

    @microkatz
    Contributor

    I will now be resolving this ticket as hopefully the commit has addressed your issue!

    Please re-open or create a new ticket if you have any additional questions or problems.

  9. locked and limited conversation to collaborators on Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions