Accept non-instanciated nodes for better developer experience
This commit is contained in:
parent
68b1cb87ca
commit
af7855402f
2 changed files with 3 additions and 1 deletions
|
|
@ -555,6 +555,8 @@ export const getFrequencyFromValue = (value, defaultNote = 36) => {
|
|||
};
|
||||
|
||||
export const releaseAudioNode = (node) => {
|
||||
if (node == null) return;
|
||||
|
||||
// check we received an AudioNode
|
||||
if (!(node instanceof AudioNode)) {
|
||||
throw new Error('releaseAudioNode can only release an AudioNode');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue