WebAudio🧪
该域允许检查Web Audio API。https://webaudio.github.io/web-audio-api/
EN
✅️️ Methods
🔨WebAudio.disable
禁用WebAudio域。
EN
🔨WebAudio.enable
启用WebAudio域并开始发送上下文生命周期事件。
EN
🔨WebAudio.getRealtimeData
从已注册的上下文中获取实时数据。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId |
| 返回对象 | 类型 | 描述 | 原文 |
|---|---|---|---|
| realtimeData | ContextRealtimeData |
✅️️ Events
👋WebAudio.audioListenerCreated
通知 AudioListener 的构建已完成。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| listener | ✔️ | AudioListener |
👋WebAudio.audioListenerWillBeDestroyed
通知已创建新的音频监听器(AudioListener)。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| listenerId | ✔️ | GraphObjectId |
👋WebAudio.audioNodeCreated
通知新的AudioNode已被创建。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| node | ✔️ | AudioNode |
👋WebAudio.audioNodeWillBeDestroyed
通知现有AudioNode已被销毁。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| nodeId | ✔️ | GraphObjectId |
👋WebAudio.audioParamCreated
通知新的AudioParam已被创建。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| param | ✔️ | AudioParam |
👋WebAudio.audioParamWillBeDestroyed
通知现有AudioParam已被销毁。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| nodeId | ✔️ | GraphObjectId | |||
| paramId | ✔️ | GraphObjectId |
👋WebAudio.contextChanged
通知现有BaseAudioContext已更改某些属性(id保持不变)。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| context | ✔️ | BaseAudioContext |
👋WebAudio.contextCreated
通知已创建新的BaseAudioContext。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| context | ✔️ | BaseAudioContext |
👋WebAudio.contextWillBeDestroyed
通知一个现有的BaseAudioContext将被销毁。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId |
👋WebAudio.nodeParamConnected
通知一个AudioNode已连接到一个AudioParam。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| sourceId | ✔️ | GraphObjectId | |||
| destinationId | ✔️ | GraphObjectId | |||
| sourceOutputIndex | number |
👋WebAudio.nodeParamDisconnected
通知一个AudioNode已断开与AudioParam的连接。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| sourceId | ✔️ | GraphObjectId | |||
| destinationId | ✔️ | GraphObjectId | |||
| sourceOutputIndex | number |
👋WebAudio.nodesConnected
通知两个AudioNode已连接。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| sourceId | ✔️ | GraphObjectId | |||
| destinationId | ✔️ | GraphObjectId | |||
| sourceOutputIndex | number | ||||
| destinationInputIndex | number |
👋WebAudio.nodesDisconnected
通知AudioNodes已断开连接。目标可以为null,这意味着源的所有输出连接都已断开。
EN
| 参数 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| sourceId | ✔️ | GraphObjectId | |||
| destinationId | ✔️ | GraphObjectId | |||
| sourceOutputIndex | number | ||||
| destinationInputIndex | number |
✅️️ Types
📌WebAudio.AudioListener
AudioListener的协议对象
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| listenerId | ✔️ | GraphObjectId | |||
| contextId | ✔️ | GraphObjectId |
📌WebAudio.AudioNode
AudioNode的协议对象
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| nodeId | ✔️ | GraphObjectId | |||
| contextId | ✔️ | GraphObjectId | |||
| nodeType | ✔️ | NodeType | |||
| numberOfInputs | ✔️ | number | |||
| numberOfOutputs | ✔️ | number | |||
| channelCount | ✔️ | number | |||
| channelCountMode | ✔️ | ChannelCountMode | |||
| channelInterpretation | ✔️ | ChannelInterpretation |
📌WebAudio.AudioParam
AudioParam 的协议对象
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| paramId | ✔️ | GraphObjectId | |||
| nodeId | ✔️ | GraphObjectId | |||
| contextId | ✔️ | GraphObjectId | |||
| paramType | ✔️ | ParamType | |||
| rate | ✔️ | AutomationRate | |||
| defaultValue | ✔️ | number | |||
| minValue | ✔️ | number | |||
| maxValue | ✔️ | number |
📌WebAudio.AutomationRate
规范中AudioParam::AutomationRate的枚举类型
允许的取值:a-rate, k-rate
EN
Allowed Values:
a-rate, k-rate返回类型:string
📌WebAudio.BaseAudioContext
BaseAudioContext 的 协议对象
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| contextId | ✔️ | GraphObjectId | |||
| contextType | ✔️ | ContextType | |||
| contextState | ✔️ | ContextState | |||
| realtimeData | ContextRealtimeData | ||||
| callbackBufferSize | ✔️ | number | 平台相关的回调缓冲区大小。 | ENPlatform-dependent callback buffer size. | |
| maxOutputChannelCount | ✔️ | number | 音频硬件当前支持的输出通道数量。 | ENNumber of output channels supported by audio hardware in use. | |
| sampleRate | ✔️ | number | 上下文采样率。 | ENContext sample rate. |
📌WebAudio.ChannelCountMode
来自规范的 AudioNode::ChannelCountMode 枚举
允许取值:clamped-max、explicit、max
EN
Allowed Values:
clamped-max, explicit, max返回类型:string
📌WebAudio.ChannelInterpretation
来自规范的AudioNode::ChannelInterpretation枚举
允许取值:discrete、speakers
EN
Allowed Values:
discrete, speakers返回类型:string
📌WebAudio.ContextRealtimeData
AudioContext中实时变化的字段。
EN
返回类型:object
| 属性 | 必填 | 标记 | 类型 | 描述 | 原文 |
|---|---|---|---|---|---|
| currentTime | ✔️ | number | 当前上下文时间(以秒为单位),位于BaseAudioContext中。 | ENThe current context time in second in BaseAudioContext. | |
| renderCapacity | ✔️ | number | 渲染图形所花费的时间除以渲染量子持续时间,再乘以100。100表示音频渲染器已达到满负荷,可能发生故障。 | ENThe time spent on rendering graph divided by render quantum duration, and multiplied by 100. 100 means the audio renderer reached the full capacity and glitch may occur. | |
| callbackIntervalMean | ✔️ | number | 回调间隔的运行平均值。 | ENA running mean of callback interval. | |
| callbackIntervalVariance | ✔️ | number | 回调间隔的运行方差。 | ENA running variance of callback interval. |
📌WebAudio.ContextState
来自规范的AudioContextState枚举
允许的取值:suspended、running、closed、interrupted
EN
Allowed Values:
suspended, running, closed, interrupted返回类型:string
📌WebAudio.ContextType
BaseAudioContext 类型枚举
允许的值:realtime, offline
EN
Allowed Values:
realtime, offline返回类型:string
📌WebAudio.GraphObjectId
Web Audio API中图形对象(AudioContext、AudioNode、AudioParam)的唯一标识符
EN
返回类型:string
📌WebAudio.NodeType
AudioNode类型枚举
EN
返回类型:string
📌WebAudio.ParamType
AudioParam 类型枚举
EN
返回类型:string