Android Question libStreaming v1.3 and Echo Canceler

amer bashar

Member
Licensed User
Hi all,
I know its an old lib but it the only one which can stream camera and audio to rtsp server and it works very good, but if we want to cancel the echo we must activate android feature AcousticEchoCanceler.
The only woking way found in the forum is Erel`s which is activated on AudioStreamer:
B4X:
Sub SetEchoCanceler
    Dim echo As JavaObject
    echo.InitializeStatic("android/media/audiofx/AcousticEchoCanceler".Replace("/", "."))
    If echo.RunMethod("isAvailable", Null) = True Then
        Dim r As Reflector
        r.Target = streamer
        Dim AudioRecord As JavaObject = r.GetField("audioRecord")
        echo=   echo.RunMethod("create", Array(AudioRecord.RunMethod("getAudioSessionId", Null)))
        echo.RunMethod("setEnabled" , Array As Object(True))
        ToastMessageShow("echo set" , True)
    Else
        ToastMessageShow("Echo not available",False)
    End If
End Sub
can I activate this way on libStreaming? or on SessionBuilder or RtspClient? I mean can we get the "getAudioSessionId" of the libStreaming?
 
Top