Skip to main content
Participant
July 8, 2013
Answered

AIR for iOS - Accessing the Headphone Microphone

  • July 8, 2013
  • 4 replies
  • 1056 views

iPad (3)

iOS 6.1.3

AIR 2.4

I'm trying to listen to the audio coming from a microphone attached via the headphone jack but AIR doesn't seem to recognize it?

When I trace to debugger => Microphone.names all I get is "iOSMicrophone"

I tried to force a second mic but just came up with errors (rightfully so)

When I loop back the defualt mic the audio is just from the imbedded mic.

I'm using a RockIt to attach a headphone out from a laptop to the min in.

http://www.amazon.com/gp/product/B006T65CXE/ref=oh_details_o01_s00_i00?ie=UTF8&psc=1

I know - headphone out and line in arn't the same thing.  But that doesn't seem to be the problem (yet).  I don't have access to the headphone mic at all.

Any ideas?

Thank you!

This topic is closed to new replies. Start a new post to keep the conversation going.
Correct answer nimitja

Could you please try updating your AIR version to the latest AIR SDK 3.7 available at http://www.adobe.com/devnet/air/air-sdk-download.html.

Regards,

Nimit

4 replies

nimitjaCorrect answer
Adobe Employee
July 9, 2013

Could you please try updating your AIR version to the latest AIR SDK 3.7 available at http://www.adobe.com/devnet/air/air-sdk-download.html.

Regards,

Nimit

Participant
July 9, 2013

Thanks for the quick reply. Gave that a try. Unfortunatlly same result.

I'm displaing the air version to be sure, app runtime shows: 3.7.0.2100

The only mic showing up is iOSMicrophone

Participant
July 9, 2013

For the fun of it, here's my code:

In my document class:

                    private function startApp() : void

                              {

 

                                        _storage.audioSend = new AudioComSend( this );

 

                                        contentHolder.displayOutput.text = "";

                                        _storage.audioRec = new AudioComRecieve( this, audioComRec );

 

                                        contentHolder.displayOutput.text = Microphone.names;

                                        contentHolder.displayVersion.text = NativeApplication.nativeApplication.runtimeVersion;

 

                                        trace( "AIR Version: " + NativeApplication.nativeApplication.runtimeVersion );

                                        trace( "Microphone.names: " + Microphone.names );

 

                              }

In the AudioComRecieve class:

          public function AudioComRecieve( br:Object, cb:Function, whichMic:Number = -1 ) : void

                              {

                                        _baseRef = br;

                                        _storage.callBack = cb;

                                        _storage.whichMic = whichMic;

 

                                        initReciever();

                              }

 

                    private function initReciever() : void

                              {

                                        trace( Microphone.names );

 

                                        _storage.bufferSize = 2048

                                        _storage.minBuffer = 1024;

                                        _storage.outputActive = false;

 

                                        _storage.levelAvg = 0;

                                        _storage.levelAmt = 0;

 

                                        _storage.mic = Microphone.getMicrophone( _storage.whichMic );

                                        _storage.mic.rate = 44;

                                        _storage.mic.setSilenceLevel(0);

                                        _storage.mic.setLoopBack( true );

 

                                        _storage.soundTransform = new SoundTransform( 0, 0 );

                    //_storage.mic.soundTransform = _storage.soundTransform;

 

                                        _baseRef.addEventListener( Event.ENTER_FRAME, micListener );

 

                                        _storage.receiving = false;

                                        _storage.stringBinary =  "";

 

                                        _storage.timeOfLastTone = new Date().time;

 

                              }