Skip to content

Instantly share code, notes, and snippets.

@kheldiente
Created May 28, 2018 10:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kheldiente/d81c645b5695030337ccfb045d52e2a5 to your computer and use it in GitHub Desktop.
Save kheldiente/d81c645b5695030337ccfb045d52e2a5 to your computer and use it in GitHub Desktop.
On band level changed on equalizer view
override fun onBandLevelChanged(bandId: Int, value: Int, fromUser: Boolean) {
val lowestBandLevel = equalizer?.bandLevelRange?.get(0)
val bandLevel = (value.plus(lowestBandLevel!!)).toShort()
// Manipulate equalizer band level
setBandLevel(bandId.toShort(), bandLevel)
... Cached current value of band
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment