Android Question ExoPlayer and EQLib

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'.

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

Erel

Administrator
Staff member
Licensed User
B4X:
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
 
Top