Highlighted

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

Community Beginner ,
Oct 05, 2016

Copy link to clipboard

Copied

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...

TOPICS
Air beta

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

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

Community Beginner ,
Oct 05, 2016

Copy link to clipboard

Copied

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...

TOPICS
Air beta

Views

2.6K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Oct 05, 2016 0
Adobe Employee ,
Oct 05, 2016

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2016 0
Community Beginner ,
Oct 05, 2016

Copy link to clipboard

Copied

Thank you for your answer.

I  have already set  MODIFY_AUDIO_SETTINGS in my app.xml.

This is as follow:

<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>

and I have already set as you send the method. But the problem is equal.

How do I share my project for you? Please give me a way to share.

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2016 0
Adobe Employee ,
Oct 05, 2016

Copy link to clipboard

Copied

Hi Jadestar,

Please share it through Dropbox.

We will investigate it further.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2016 0
Community Beginner ,
Oct 05, 2016

Copy link to clipboard

Copied

I shared source code in dropbox

The link is following as:

Dropbox - PrisonerChat-test.rar

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 05, 2016 0
Adobe Employee ,
Oct 06, 2016

Copy link to clipboard

Copied

Hi Jadestar,

Could you please help me by giving some guidelines to use the project that you shared.

I have successfully imported the project in Flash Builder. But when I started debugging, I got stream error with the URL mentioned in config.as. I changed the URL with my local server address but I got no success so far.

Could you please provide us some steps that is required to use the project for establishing a successful connection between iOS and Android device.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 06, 2016 0
Adobe Employee ,
Oct 07, 2016

Copy link to clipboard

Copied

Hi Jadestar,

We are having one related bug in our bugbase. Please go through below link:

Bug#4195154 - Enhanced microphone causes wrong audio output to be used - small speaker instead of ha...

Kindly let me know if the issue at your end is similar to this bug.

Thanks,

Deepika

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2016 0
Community Beginner ,
Oct 07, 2016

Copy link to clipboard

Copied

The running environment of this project is not simple.

So I am preparing the environment of testing for you.

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 07, 2016 0
Adobe Employee ,
Oct 21, 2016

Copy link to clipboard

Copied

Hi Jadestar,

We have investigated it further and found that if we use SoundMixer.useSpeakerphoneForVoice = true; in our actionscript code the application seems to be working fine.

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/SoundMixer.html

Kindly test it at your end and let us know about the results.

Thanks,

Adobe AIR Team

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Oct 21, 2016 0
Participant ,
Jan 19, 2017

Copy link to clipboard

Copied

Hi, I am not sure if this issue was resolved, but I am experiencing the same issue:

Android 4/5/6, Air 23 SDK

"MODIFY_AUDIO_SETTINGS" in manifest

mic = Microphone.getEnhancedMicrophone();

mic.gain = 80;

mic.rate = 22;

mic.codec = SoundCodec.SPEEX;

SoundMixer.audioPlaybackMode = AudioPlaybackMode.VOICE;

SoundMixer.useSpeakerphoneForVoice = true;

And I still get echo.

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 19, 2017 0