WebKit iOS上BiquadFilterNode上的getFrequencyResponse始终为全1,无论选择什么过滤器参数。
是否有任何破解或解决方法可以真正使它正常工作?
编辑:根据要求,提供相关代码(CoffeeScript)的要点:
numFreqs = App.Audio.config.spectrumNumBands / 16
freqs = new Float32Array(numFreqs)
freqResponse = new Float32Array(numFreqs)
phaseResponse = new Float32Array(numFreqs)
for a in [0...numFreqs]
freqs[a] = (a/numFreqs) ** App.Audio.config.spectrumLog * (App.Audio.context.sampleRate/2) + 0.0001
filterNode.getFrequencyResponse(freqs, freqResponse, phaseResponse)
此后,无论过滤器参数是通过setValueAtTime还是直接设置它们,freqResponse都为1,phaseResponse都为0。