Android Question Acoustic Echo Canceler

Discussion in 'Android Questions' started by KZero, Feb 9, 2018.

  1. KZero

    KZero Active Member Licensed User

    Hello,

    i'm trying to get this code working for long time with no avail

    test project attached with AudioStreamer (real time record and playack) to know if the code is working
    ** just increase the voice call volume to max and start talk bit loudly to determine if the echo canceler is working or not

    more info about Acoustic echo canceler : https://developer.android.com/reference/android/media/audiofx/AcousticEchoCanceler.html
    Code:
    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
    i wish anyone can help with it or any available working alternative
     

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    What happens when you try it?
     
    KZero likes this.
  3. KZero

    KZero Active Member Licensed User

    the code executed and i see the "echo set" toast but nothing affect the voice echo
     
  4. Erel

    Erel Administrator Staff Member Licensed User

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