Skip to main content
jadestarh65085165
Participating Frequently
October 6, 2016
Question

The problem of Microphone.getEnhancedMicrophone() in AIR SDK 23

  • October 6, 2016
  • 11 replies
  • 3378 views

I am developing an android and iOS chatting app using air SDK 23.0 in flash builder 4.7.

The chatting server is Red5 0.6.

The mobile source code is following.

var devMic:Microphone = Microphone.getEnhancedMicrophone(); 

devMic.setUseEchoSuppression(true);

devMic.setLoopBack(false); 

devMic.gain = 80; 

devMic.rate = 11;

devMic.codec = SoundCodec.NELLYMOSER; 

devMic.addEventListener(StatusEvent.STATUS, onMicStatus); 

... ... ...

outStream = new NetStream(this);

if (useMic)

    outStream.attachAudio(devMic); // the phone speaker volume is lower and is impossible to hear.

outStream.publish(chatInfo.user_id, "live");

I use Microphone.getEnhancedMicrophone() function,

In this case, the microphone volume of my android is normal and the other side hears normally.

But the phone's speaker sound is so low I can not hear each other's words.

The above problem does not occur with the iPhone.

Before AIR SDK 23 released, I used Microphone.getMicrophone() with AIR SDK 22.0, The above problem does not occur with the android but has the echo problem.

What is the cause of this problem?

Please help me...

This topic has been closed for replies.

11 replies

deesharm
Adobe Employee
Adobe Employee
October 6, 2016

Hi Jadestar,

Please try using below android permission in app.xml:

"MODIFY_AUDIO_SETTINGS"

Also, do some more modifications in code as:

devMic.gain = 80;

devMic.rate = 22;

devMic.codec = SoundCodec.SPEEX;

Let us know if the problem still persists and kindly share a sample project with us.

Thanks,

Adobe AIR Team