Skip to content

Instantly share code, notes, and snippets.

@dzolnai
Created November 29, 2019 13:06
Show Gist options
  • Save dzolnai/de2dfbd6ed0ee2523744d7973ecb48e2 to your computer and use it in GitHub Desktop.
Save dzolnai/de2dfbd6ed0ee2523744d7973ecb48e2 to your computer and use it in GitHub Desktop.
Creating an ExoPlayer with your own audioprocessor
private val fftAudioProcessor = FFTAudioProcessor()
val renderersFactory = object : DefaultRenderersFactory(this) {
override fun buildAudioProcessors(): Array<AudioProcessor> {
val processors = super.buildAudioProcessors()
return processors + fftAudioProcessor
}
}
player = ExoPlayerFactory.newSimpleInstance(this, renderersFactory, DefaultTrackSelector())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment