ANE-RecordAudio is a native extension to record and Convert audio in many formats. The extension can record a single stream at a time, which means it has some sort of global state. When a developer wants to record something, a method must be invoked. Another method can be invoked to stop the recording. All subsequent method calls will operate over the recorded data, e.g. play it.

The extension has a significant range of file formats, such as AC3, MPEG4 AAC, MPEG Layer3, and more. The format can be informed before the recording process begins. It’s also possible to choose the name of the resulting file and its sample rate. After the file has been recorded, the extension allows it to be converted to mp3 or AMR. An AMR file can be played by the extension.

Sample

setTimeout(function():void{
    trace('1');
    RecordAudio.instance.startRecord('test1');
}, 3000);

setTimeout(function():void{
    RecordAudio.instance.stopRecord(function(url:String):void{
        var f:File = new File(url);
        trace(f.exists, url);
    });

    trace('2');
}, 6000);

setTimeout(function():void{
    RecordAudio.instance.toMp3(function(url):void{
        var f:File = new File(url);
        trace(f.exists, url);

    });
}, 8000);
Air Native Extension, iOS. URL.