This tutorial will b short and maybe not fairly complete , but i will be talkin about the major functions and datastructures you would need to fetch data from the microhpne and store it on your system.
The following is ta brief code snippet:
protected function startRecording():void
microphone = Microphone.getMicrophone();
microphone.rate = 44;
microphone.gain = 100;
soundClip = new ByteArray();
The line microphone = Microphone.getMicrophone(); gets an object by the name microphone which allows you to handle and control the data from the microphone attached on your system.This will return a null if no microphone is detected on your system.The rate , is the rate of data fetch and the gain is the amount of amplification to the sound input.The soundClip object is simply put an array.
The method microphone.addEventListener(SampleDataEvent.SAMPLE_DATA,
is the major function for fetching data from the microphone, this says that whenever the sampling is done by the soundcard and the data is being fed to the OS, an event is triggered, and the function microphone_sampleDataHandler() is called.
protected function microphone_sampleDataHandler(event:SampleDataEvent):void
var sample:Number = event.data.readFloat();
In the function above , the data being fetched from sample , i.e event.data.readFloat() is being written into the array.
protected function stopRecording():void
subject.text = "";
In the function saveNote() you can write the soundClip array into a file, or a database, or any kind of saving you need to do.
Lets hope this tute was helpfule.