1 Reply Latest reply on Jul 7, 2010 7:10 AM by Marcidus

    Microphone class might be bugged

    Marcidus

      I have been trying to get the SampleDataEvent to trigger, however no matter what i try, after applying the listener to the microphone object, nothing happens.

       

      I tested to make sure that the microphone was working and that air was receiving it using the setLoopBack and i get my own voice back well enough.  the only issue is that the event will just not fire.

       

      // parent window container property - creationComplete="ready()"

       

       

      private var _mic:Microphone;

       

       

      private function ready():void {

       

      _mic = Microphone.getMicrophone(0);

      _mic.rate = 44;

      _mic.setUseEchoSuppression(true);

      _mic.setSilenceLevel(50, 1000);

      }

       

       

       

      private function recordAudio(e:MouseEvent):void {

      _mic.addEventListener(SampleDataEvent.SAMPLE_DATA, gotMicData);

      }

       

       

      private function gotMicData(e:SampleDataEvent):void {

      trace("Hello, World!");

      }

       

       

       

      i've read cases where it works on firefox, and chrome, but not on IE, however im using windows 7 and running the app from the desktop with Air.