Sub JAUDIO_Event (MethodName As String, Args() As Object) As Object
Log(MethodName)
If MethodName = "onAudioSessionId" Then
AudioSessionID = Args(0)
Log("AudioSessionID: " & AudioSessionID)
Dim level As Int = 20
Dim job As JavaObject
Dim jLoudness As JavaObject = job.InitializeNewInstance("android.media.audiofx.LoudnessEnhancer", Array(AudioSessionID))
jLoudness.RunMethod("setTargetGain", Array(level*100))
Log("Loudness level: " & jLoudness.RunMethod("getTargetGain", Null))
End If
Return Null
End Sub