Android Question ExoPlayer and EQLib

Discussion in 'Android Questions' started by Agnetha, Jun 30, 2019.

  1. Agnetha

    Agnetha Member Licensed User

    Hello!
    Is it possible to use the Equalizer Library (EQLib) together with the Exoplayer?
    I can't get the AudioSessionId of the Exoplayer.
    Always returns '0'.

    Code:
    Dim R As Reflector
    R.Target=Player1
    R.Target=R.GetField(
    "player")
     
    Dim AudioSessionId As Int = R.RunMethod("getAudioSessionId")
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Code:
    Dim jo As JavaObject = player1   
           
    Dim AudioEventListener As Object = jo.CreateEventFromUI("com.google.android.exoplayer2.audio.AudioRendererEventListener""AudioEvent"Null)
           jo.GetFieldJO(
    "player").RunMethod("setAudioDebugListener"Array(AudioEventListener))

    Sub AudioEvent_Event (MethodName As String, Args() As Object) As Object
       
    Log(MethodName)
       
    If MethodName = "onAudioSessionId" Then
           
    Dim id As Int = Args(0)
           
    Log("session id: " & id)
       
    End If
       
    Return Null
    End Sub
     
    Agnetha likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice