One of the most fundamental things a developer would want to be able to do with audio sample data gathered from an Android microphone, would be to capture the data and use it in some way within an application. This recipe will demonstrate how to preserve and play back captured microphone audio sample data.
We will employ an event listener to respond to sample data reported through the
Microphone API by writing captured audio data to a
ByteArray and then playing it back internally through the
import flash.display.Sprite; import flash.display.Stage; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.SampleDataEvent; ...