我正在Flex 4中制作网络摄像头广播应用程序,我可以通过编程方式切换摄像机,让我的应用程序内的用户选择哪个摄像头,但当用户尝试选择麦克风时,它始终是默认的麦克风始终在广播的设置。
如何像网络摄像头那样覆盖该设置?
private function selectmic(event:DropDownEvent):void {
var index:int=micdropDownList.selectedIndex;
microphone = Microphone.getEnhancedMicrophone(index);
microphone.codec=SoundCodec.SPEEX;
microphone.encodeQuality=5;
microphone.setSilenceLevel(0);
microphone.framesPerPacket = 1;
microphone.gain = 75;
microphone.rate = 44;
}
我正在使用
将它附加到流中pubStream.attachAudio(microphone);
答案 0 :(得分:1)
不是最好但更好的麦克风设置......
microphone = Microphone.getEnhancedMicrophone();
//microphone.codec =SoundCodec.NELLYMOSER; //for recording
microphone.codec =SoundCodec.SPEEX; //for live
microphone.enableVAD = true;
microphone.setLoopBack(false);
microphone.setUseEchoSuppression(true);
microphone.setSilenceLevel(0,2000);
microphone.rate = 44;
microphone.gain = 1;
microphone.encodeQuality = 7;
microphone.framesPerPacket = 1;
如果有人拥有,请添加更多设置,以使其最佳设置.. _ / _