Fixes for zzfx and soundfonts
This commit is contained in:
parent
b6264a1513
commit
0edede106a
2 changed files with 6 additions and 2 deletions
|
|
@ -19,7 +19,11 @@ const getNodeParam = (node, name) => {
|
|||
}
|
||||
}
|
||||
// Built-in node case
|
||||
const p = node?.[name];
|
||||
let p = node?.[name];
|
||||
if (p === undefined && name === 'frequency') {
|
||||
// Fallbacks for source nodes without 'frequency' params (e.g. soundfonts)
|
||||
p = node?.['detune'] ?? node?.['playbackRate'];
|
||||
}
|
||||
if (p instanceof AudioParam) {
|
||||
return p;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ export const getZZFX = (value, t) => {
|
|||
source.start(t);
|
||||
return {
|
||||
node: source,
|
||||
nodes: { source: [source] },
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -91,6 +90,7 @@ export function registerZZFXSounds() {
|
|||
});
|
||||
return {
|
||||
node: o,
|
||||
nodes: { source: [o] },
|
||||
stop: () => {},
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue