1 Reply Latest reply on Aug 22, 2011 10:32 PM by Vibhuti Gosavi(InfoCepts)

    What is the format of audio recorded by Microphone project

    april_pu_1234

      Following are the code I found :

      protected function recBtn_clickHandler(event:MouseEvent):void   
      {   
                      rec=new ByteArray();
                      mic = Microphone.getMicrophone();
                      mic.rate=44;
                      mic.addEventListener(SampleDataEvent.SAMPLE_DATA, getMicAudio);
                      ply_Btn.enabled=false;   
      }

      private function getMicAudio(e:SampleDataEvent): void   
      {
                      rec.writeBytes(e.data);   
                      lbl.text = String(rec.length);  

      }