Unable to find native AudioParam on connection
See original GitHub issueI’m trying to integrate standardized-audio-context into Tone.js, but i’m getting an issue when i try to use it in a simple Oscillator: Uncaught Error: A value with the given key could not be found.
Here’s how i reproduced it: https://codesandbox.io/s/sharp-currying-k9v9y
For context, the oscillator uses two ConstantSourceNodes connected to the frequency
and detune
of the OscillatorNode. it seems to cause an issue when the constant source is connected to the AudioParam. It is unable to resolve the native AudioParam in the WeakMap. Either the AudioParam has been already garbage collected, which seems unlikely, or possibly it was not added.
Thanks for your help!
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
Constructible and connect()able AudioParams #367 - GitHub
Binding AudioParam of another AudioNode to an AudioWorker As far as i understand, it is impossible to change a native AudioNodes' parameter ...
Read more >How does the audioParam.exponentialRampToValueAtTime ...
It seems that this function does not like 0 value. FF throws "SyntaxError: An invalid or illegal string was specified".
Read more >AudioParam - Web APIs | MDN
Chrome Edge
AudioParam Full support. Chrome14. Toggle history Full support. Edge12. Toggl...
automationRate Full support. Chrome68. Toggle history Full support. Edge79. Toggl...
cancelAndHoldAtTime Full support. Chrome57....
Read more >Web Audio API - W3C
An AudioParam interface, for controlling an individual aspect of an AudioNode 's functioning, such as volume. An AudioListener interface, which ...
Read more >Web Audio API - GitHub Pages
Abstract. This specification describes a high-level Web API for processing and synthesizing audio in web applications.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
After writing the message above yesterday I realized that it is unfortunately not that easy. Up to now we have the following behavior which I think is super confusing.
I changed that now that an AudioBuffer created with standardized-audio-context also returns true when doing an instanceof check with the constructor exported by standardized-audio-context.
Only the result of the last console.log() from the example above will change when using v21.2.1 (yet to be released) onwards.
I hope this makes sense to you as well.
Yes an instanceof check will work.
The AudioBuffer implementation is very dirty because by definition an AudioBuffer is the only thing which can be shared across different (Offline)AudioContexts. The constructor in particular is doing something which should normally never be done: https://github.com/chrisguttandin/standardized-audio-context/blob/master/src/factories/audio-buffer-constructor.ts#L89 😃
I did all this to make the following work: