I've been waiting for the day that flash gets access to raw audio data. That day is now, but i'm not sure how to get 10.1 working in CS4. I have 10.1 installed and a function bound to the mic's "SampleDataEvent.SAMPLE_DATA" but my "micSampleData" function is not being called.
var mic = Microphone.getMicrophone();
Security.showSettings(SecurityPanel.MICROPHONE);
mic.setUseEchoSuppression(true);
mic.setLoopBack(true);
mic.rate = 44;
function micActivity(event:ActivityEvent):void
{
trace("micActivity: " + event);
}
function micStatus(event:StatusEvent):void
{
trace("micStatus: " + event);
}
function micSampleData(event:SampleDataEvent):void
{
trace("micSampleData: " + event);
}
mic.addEventListener(ActivityEvent.ACTIVITY, micActivity);
mic.addEventListener(StatusEvent.STATUS, micStatus);
mic.addEventListener(SampleDataEvent.SAMPLE_DATA, micSampleData);