Skip to content

10-band EQ support - #319

Draft
abart27 wants to merge 1 commit into
sosauce:mainfrom
abart27:feature/MoreEQBands
Draft

10-band EQ support#319
abart27 wants to merge 1 commit into
sosauce:mainfrom
abart27:feature/MoreEQBands

Conversation

@abart27

@abart27 abart27 commented Jul 24, 2026

Copy link
Copy Markdown

Changes the EQ to use 10 (or 5 on unsupported hardware) hardcoded bands instead of the system-provided ones.

System presets are still present, but are remapped when applied.

Existing preset handling tbd

Also fixes a the band frequency labels showing kHz instead of Hz.

Closes #318

@abart27
abart27 force-pushed the feature/MoreEQBands branch from ad5d4ea to db33f5f Compare July 24, 2026 20:51
@sosauce

sosauce commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Will review after my holidays

@abart27

abart27 commented Jul 25, 2026

Copy link
Copy Markdown
Author

I'm running into some questionable design on the Android Equalizer API side: you can't pull Equalizer.Settings from a preset without applying it.

This means we need to either build a full list of all presets and their settings via a janky workaround that involves cycling through and applying every preset, or forego the built-in presets entirely and hardcode our own equivalent ones to avoid abusing the API in this way.

example of the weird helper that would do this

fun getAllPresetSettingsListSimple(audioSessionId: Int): List<Equalizer.Settings> {
    val equalizer = Equalizer(0, audioSessionId)
    return try {
        val numPresets = equalizer.numberOfPresets
        List(numPresets.toInt()) { i ->
            equalizer.usePreset(i.toShort())
            equalizer.properties
        }
    } finally {
        equalizer.release()
    }
}

In both cases, the end result for the user would be roughly the same, with maybe slight deviations in how hardcoded presets sound vs the system ones (because we're remapping bands).

What do you think would be more in-line with Chocola's philosophy (or is it up for me to decide)?

@sosauce

sosauce commented Jul 27, 2026

Copy link
Copy Markdown
Owner

I honestly don't use the EQ, it's here cuz people wanted it, so do whatever you think is best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More equalizer bands

2 participants