• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do you toggle a microphone directly between enhanced and non-enhanced?

Explorer ,
Apr 29, 2014 Apr 29, 2014

Copy link to clipboard

Copied

Apparently mixing calls between Microphone.getMicrophone() and Microphone.getEnhancedMicrophone() on the same device doesn't work very well.  Take the following code:

<?xml version="1.0" encoding="utf-8"?>

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

               xmlns:s="library://ns.adobe.com/flex/spark"

               xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" creationComplete="onCreationComplete()" click="Microphone.getMicrophone().setLoopBack(true);">

    <fx:Script>

        <![CDATA[

            import mx.controls.Alert;

           

            private function onCreationComplete():void

            {

                Microphone.getEnhancedMicrophone().setLoopBack(true);

            }

        ]]>

    </fx:Script>

</s:Application>

You will be able to hear yourself speak at first, but as soon as you click the app, you will no longer be able to hear your voice.  I have also seen this sort of thing in other scenarios.

To make a long story short, if you call getEnhancedMicrophone() for one device, then try to call getMicrophone() for that same device, the device will stop providing any audio input.  The same is true vice versa.  However if you call getEnhancedMicrophone() for one device, then getMicrophone() for a different device, then come back to the first and call getMicrophone() for it, the device will work just fine.

Why?  Is there any way to just toggle between enhanced and non-enhanced settings for the same device, without reaching out to an unrelated device?  Thanks!

TOPICS
ActionScript

Views

370

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
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 29, 2014 Apr 29, 2014

On your Microphone reference you have these constants you can set your options to:

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

As you can see there, MicrophoneEnhancedMode.OFF disables enhanced mode. You would set your Microphone references .mode property to equal that to disable enhanced, or use one of the other relevant options to enable it. Thus, you should always use enhanced so you can toggle it.

Votes

Translate

Translate
LEGEND ,
Apr 29, 2014 Apr 29, 2014

Copy link to clipboard

Copied

On your Microphone reference you have these constants you can set your options to:

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

As you can see there, MicrophoneEnhancedMode.OFF disables enhanced mode. You would set your Microphone references .mode property to equal that to disable enhanced, or use one of the other relevant options to enable it. Thus, you should always use enhanced so you can toggle it.

Votes

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
community guidelines
Explorer ,
Apr 29, 2014 Apr 29, 2014

Copy link to clipboard

Copied

Wow, didn't think about that.  Thanks!

Votes

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
community guidelines
LEGEND ,
Apr 29, 2014 Apr 29, 2014

Copy link to clipboard

Copied

LATEST

You're welcome!

Votes

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
community guidelines