GoogleChrome / GoogleChrome/omnitone
Renderer setters don't work until after initialize promise resolves
- Dominant language
- JavaScript
- Stars
- 911
- Forks
- 118
- Avg merge
- 2m
- Merged PRs (30d)
- 3
Description
All of the setter methods on the renderers (e.g. `setChannelMap`, `setRotationMatrix3`) do nothing if they are called before the `initialize` promise resolves. There is no warning or error, and this behavior is not documented.
There isn't really any reason why these methods can't operate immediately, since they depend on objects created in `_buildAudioGraph`, which is run in the constructor, not in `initialize`. (Initialization only loads the HRIRs.)
This issue manifests, for example, as a bug in [Resonance Audio Web SDK](https://github.com/resonance-audio/resonance-audio-web-sdk) where the rotation matrix should be set immediately by an option to the constructor, but it does not take effect because the `setRotationMatrix3` call on the Omnitone renderer does nothing.
Contributor guide
Assessment
This issue has not been assessed yet.