AS3 Flash Audio echo cancellation not working

406 Views Asked by At

I created video conference using red5 and as3 but i have a problem with loopback effect. I'm using "getEnhancedMicrophone for my microphone" but echo cancellation still exists. I'm using Flash FDT to compile my as3 project. I configured the latest version of the flash player.

Problem path:

  1. Client X say something (he uses only headphones) and then on the Client Y side - voice from Client X will be played.
  2. Client Y uses only speakers and microphone... so sound from speakers will be captured by microphone and will be sent to the Client X

Effect: Voice of the customer X will come back to him.

My microphone code looks like:

        mic = Microphone.getEnhancedMicrophone();           
        var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
        options.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
        options.autoGain = false;
        options.echoPath = 128;
        options.nonLinearProcessing = true;
        mic['enhancedOptions'] = options;

        mic.setUseEchoSuppression(true);
        mic.setLoopBack(false);
        mic.setSilenceLevel(30);

        mic.codec = SoundCodec.SPEEX;
        mic.framesPerPacket = 1;
        mic.rate = 8;    
        mic.encodeQuality = 4;   
        mic.gain = 40; 

Thanks for any advices!

0

There are 0 best solutions below