How to make AEC work with external webcam?
Hi everyone.
What I'm trying to do is to make AEC work with external webcams. My target: flash in browser and desktop AIR app.
I have the following situations:
1. Laptop Lenovo S400, really not the best laptop, with MIC placed right above the speakers. But... AEC works excellent!
2. PC with Logitech 1080p webcam (which has stereo microphones) and external speakers. But... AEC doesn't work at all. It even doesn't try to reduce any speakers sound in microphone data.
3. The same laptop with connected Logitech camera and again - AEC doesn't work.
In each situation I use absolutaly the same environment(Win7, target player - 11.9, Flex 4.6.0 SDK), code, compiller, etc..
And I was unable to find any info for such situation.
Does anybody have experience with such problem? I will be really grateful for any help.
Here are parts of code:
// somwhere early...
_microphone = Microphone.getEnhancedMicrophone();
// called before we attach microphone to NetStream
private function _setMicrophoneMode():void
{
_microphone.setLoopBack(false);
_microphone.framesPerPacket = 1;
_microphone.setSilenceLevel(0, 2000);
_microphone.codec = SoundCodec.SPEEX;
_microphone.encodeQuality = 10;
_microphone.gain = 50;
_microphone.rate = 44;
if (_useEchoSuppression)
{
var options:MicrophoneEnhancedOptions = _microphone.enhancedOptions;
options.mode = MicrophoneEnhancedMode.HALF_DUPLEX;// using this for external webcams
options.echoPath = 128;
options.nonLinearProcessing = true;
_microphone.enhancedOptions = options;
} else
{
_microphone.setUseEchoSuppression(true);
}
trace(_microphone);
}