webaudiomodules / api

Web Audio Modules (WAMs) API
176 stars 15 forks source link

add dependencies getter in WamEnv #15

Closed Fr0stbyteR closed 2 years ago

Fr0stbyteR commented 2 years ago

dependencies is a map of plugin moduleIds and its dependencies. apiVersion indicates the version of the WAM API that the host adopts. Can be used to check if the plugin is compatible with the host, using apiVersion in the WamDescriptor.

This allows to inject into the audio thread with something like

globalThis.webAudioModules.dependencies[moduleId].MyClass = MyClass;