(id: string, data: Record<string, any>)
| 25 | } |
| 26 | |
| 27 | export function updateAudioNode(id: string, data: Record<string, any>) { |
| 28 | const node = nodes.get(id); |
| 29 | |
| 30 | for (const [key, val] of Object.entries(data)) { |
| 31 | if (node[key] instanceof AudioParam) { |
| 32 | node[key].value = val; |
| 33 | } else { |
| 34 | node[key] = val; |
| 35 | } |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | export function removeAudioNode(id: string) { |
| 40 | const node = nodes.get(id); |
no outgoing calls
no test coverage detected