我一直在等待闪存访问原始音频数据的那一天。那一天是现在,但我不确定如何让 10.1 在 CS4 中工作。我安装了 10.1 并且绑定到麦克风的“SampleDataEvent.SAMPLE_DATA”的函数,但没有调用我的“micSampleData”函数。
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);