function createAudioMeter(audioContext,clipLevel,averaging,clipLag) {
var processor = audioContext.createScriptProcessor(512);
processor.onaudioprocess = volumeAudioProcess;
processor.clipping = false;
processor.lastClip = 0;
processor.volume = 0;
processor.clipLevel = clipLevel || 0.98;
processor.averaging = averaging || 0.95;
processor.clipLag = clipLag || 85;
我对我们如何将变量“clipping”、“lastClip”、“volume”等分配给 ScriptProcessor 感到困惑。我查看了 ScriptProcessor 的文档,似乎还没有定义这些。
谢谢。