(For developers) How to properly support equalization in a player app

Literally 2 lines of code required:

Additional hints:

  • don't change session id between played tracks, playlists, etc. Keep single session id per playback session (per playing service lifetime)
    • this reduces possible artifacts on session start, as effects require some time to setup and apply
    • also this approach reduces resources usage as no tear-down/re-setup of effects is required
  • don't use multiple session ids even if you use multiple MediaPlayers/AudioTracks (for example, for the crossfade)
    • this also reduces resources usage as there is need for multiple effects then

To implement the hints above, get audio session id once from the first MediaPlayer/AudioTrack and reuse it for the next created MediaPlayers/AudioTracks.