MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / updateAudioNode

Function updateAudioNode

audio-flow/src/Audio.ts:27–37  ·  view source on GitHub ↗
(id: string, data: Record<string, any>)

Source from the content-addressed store, hash-verified

25}
26
27export 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
39export function removeAudioNode(id: string) {
40 const node = nodes.get(id);

Callers 3

changeFrequencyFunction · 0.90
changeTypeFunction · 0.90
changeGainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected