Highlighted

AIR25 to AIR28: iOS app crashes when accessing to a Microphone object

Explorer ,
Dec 01, 2017

Copy link to clipboard

Copied

Hello,

I'm facing a crash with app compiled with AIR 25 or AIR25 under iOS:

When trying to access a Microphone object, the app crashes and closes.

Hereunder the code:

import flash.media.Microphone;

public var mic:Microphone = Microphone.getMicrophone();

function enregistrer(e:Event):void {

    mic.gain = 60;

    mic.rate = 44;

    mic.setSilenceLevel(0,4000);

    sndByte.clear();

    mic.addEventListener(SampleDataEvent.SAMPLE_DATA,onRecord);

}

private function onRecord(e:SampleDataEvent):void {

    while(e.data.bytesAvailable) {

           var sample:Number = e.data.readFloat();

           sndByte.writeFloat(sample);

    }

}

The crash occurs when pressing the button to which function enregistrer is associated.

Does anybody know how to solve this issue?

Thks in advance

Correct answer by krati | Adobe Employee

Hi,

You would need to use the Permissions api for accessing Microphone. For more details please check release notes at https://helpx.adobe.com/in/flash-player/release-note/fp_24_air_24_release_notes.html

Release Notes Flash Player 24 AIR 24

Also, you will have to add cocoa key NSMicrophoneUsageDescription in your application descriptor file.

Thanks,

Krati | Adobe AIR Engineering

TOPICS
Air beta

Views

435

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

AIR25 to AIR28: iOS app crashes when accessing to a Microphone object

Explorer ,
Dec 01, 2017

Copy link to clipboard

Copied

Hello,

I'm facing a crash with app compiled with AIR 25 or AIR25 under iOS:

When trying to access a Microphone object, the app crashes and closes.

Hereunder the code:

import flash.media.Microphone;

public var mic:Microphone = Microphone.getMicrophone();

function enregistrer(e:Event):void {

    mic.gain = 60;

    mic.rate = 44;

    mic.setSilenceLevel(0,4000);

    sndByte.clear();

    mic.addEventListener(SampleDataEvent.SAMPLE_DATA,onRecord);

}

private function onRecord(e:SampleDataEvent):void {

    while(e.data.bytesAvailable) {

           var sample:Number = e.data.readFloat();

           sndByte.writeFloat(sample);

    }

}

The crash occurs when pressing the button to which function enregistrer is associated.

Does anybody know how to solve this issue?

Thks in advance

Correct answer by krati | Adobe Employee

Hi,

You would need to use the Permissions api for accessing Microphone. For more details please check release notes at https://helpx.adobe.com/in/flash-player/release-note/fp_24_air_24_release_notes.html

Release Notes Flash Player 24 AIR 24

Also, you will have to add cocoa key NSMicrophoneUsageDescription in your application descriptor file.

Thanks,

Krati | Adobe AIR Engineering

TOPICS
Air beta

Views

436

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
Dec 01, 2017 0
Adobe Employee ,
Dec 01, 2017

Copy link to clipboard

Copied

Hi,

You would need to use the Permissions api for accessing Microphone. For more details please check release notes at https://helpx.adobe.com/in/flash-player/release-note/fp_24_air_24_release_notes.html

Release Notes Flash Player 24 AIR 24

Also, you will have to add cocoa key NSMicrophoneUsageDescription in your application descriptor file.

Thanks,

Krati | Adobe AIR Engineering

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...
Dec 01, 2017 2