GoogleChrome / GoogleChrome/omnitone

Renderer setters don't work until after initialize promise resolves

Open
#102 1 comment 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.