createIIRFilter() 方法在 BaseAudioContext interface creates an IIRFilterNode , which represents a general infinite impulse response (IIR) filter which can be configured to serve as various types of filter.

句法

var iirFilter = AudioContext.createIIRFilter(feedforward, feedback);
					

参数

feedforward

An array of floating-point values specifying the feedforward (numerator) coefficients for the transfer function of the IIR filter. The maximum length of this array is 20, and at least one value must be nonzero.

feedback

An array of floating-point values specifying the feedback (denominator) coefficients for the transfer function of the IIR filter. This array may have up to 20 members, the first of which must not be zero.

返回值

IIRFilterNode implementing the filter with the specified feedback and feedforward coefficient arrays.

异常

InvalidStateError
All of the feedforward coefficients are 0, and/or the first feedback coefficient is 0.
NotSupportedError

One or both of the input arrays exceeds 20 members.

规范

规范 状态 注释
Web 音频 API
The definition of 'createIIRFilter()' in that specification.
工作草案

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
createIIRFilter Chrome 49 Edge ≤18 Firefox 53 注意事项
53 注意事项
Originally implemented on AudioContext in Firefox 50.
IE 不支持 No Opera Yes Safari 不支持 No WebView Android 49 Chrome Android 49 Firefox Android 53 注意事项
53 注意事项
Originally implemented on AudioContext in Firefox Android 50.
Opera Android Yes Safari iOS 不支持 No Samsung Internet Android 5.0

图例

完整支持

完整支持

不支持

不支持

见实现注意事项。

另请参阅

元数据

  • 最后修改: