Files
SpotiFLAC-Mobile/android/app
zarzet f63f2ca764 feat(equalizer): parametric filters with a plain text filter list
The equalizer was a graphic one: 5 to 31 bands at fixed frequencies. Tuning
an earphone to a measurement needs filters with their own frequency, gain
and width (issue 952).

The Equalizer page gets a Graphic / Parametric choice. Parametric holds up
to 20 filters (peak, low shelf, high shelf), each with a frequency from
20 Hz to 20 kHz, a gain of up to 24 dB either way and a Q from 0.1 to 20.
A filter is edited in a sheet with sliders, and each value can be typed
exactly. The bands, Bass and Treble keep their values while the filters
play, and come back with Graphic. The curve, the automatic headroom and
presets follow the mode.

Import also takes the plain text filter list that measurement and tuning
tools exchange ("Preamp: -6.2 dB", "Filter 1: ON PK Fc 105 Hz Gain -2.1 dB
Q 0.70"), and Share filter list writes one. A list that names a preamp
carries its own headroom, so automatic headroom is turned off with it.
Filters of a kind the equalizer has none of are counted and reported.

Every platform plays the same cookbook sections:

- Desktop: libavfilter's equalizer, lowshelf and highshelf, checked
  against the formulas by impulse response. The shelves are probed like
  the other optional filters and reported when the library lacks them.
- iOS: the plugin's own DSP takes a filters list in place of the bands.
- Android: the platform equalizer is a bank of fixed bands and cannot
  hold such a filter, so the filters run in the app's own DSP on the PCM
  entering the media3 sink (16, 24 and 32-bit integer and float; 16-bit
  output is dithered). It sits in front of the sink, since the sink skips
  its processor chain for the float PCM of high resolution songs. The
  input gain moves there with the filters, ahead of the platform effect
  that keeps balance, compressor and limiter. The platform MediaPlayer
  engine cannot do this: with it the equalizer is bypassed while
  Parametric is on, and the page says the new playback engine is needed
  and offers to turn it on.

A system-wide equalizer, also asked for in the issue, is not part of
this: the app does not attach effects to other apps' audio.

Known: on Android a change is heard about a second late, once the audio
already in the track's buffer has played.
2026-11-23 00:01:33 +07:00
..