Flash live audio streaming

Tag: flash , flex , actionscript , video-streaming , audio-streaming Author: liux12345 Date: 2014-02-01

i would like to know if there is a way to configure de live streaming audio settings in flex4.6 (as3) (because the default audio is very poor) the same way i can control the resolution of the streaming that i want to use for publishing using the codec H264:

    var h264Settings:H264VideoStreamSettings = new H264VideoStreamSettings();
    h264Settings.setProfileLevel(H264Profile.BASELINE, H264Level.LEVEL_3);
    h264Settings.setQuality(0,80);
    h264Settings.setKeyFrameInterval(35);
    h264Settings.setMode(320, 240, 15);
    myStream.videoStreamSettings = h264Settings;

I would like to know too if there is a way to change the codec or compression for audio, because there is a lot of info for video but i havent found a lot for LIVE audio.

Thanks.

Best Answer

i Finally found it searching. The solution was

mic = Microphone.getMicrophone();
mic.codec = SoundCodec.SPEEX;
mic.setUseEchoSuppression(true);
mic.gain = 75;
mic.rate = 44;
mic.setSilenceLevel(5, 1000);           
mic.encodeQuality =10;

I hope this be useful for someone.