meytin1337 / youtube-dj

2 stars 0 forks source link

Audio context needs to be shared between tracks #12

Open meytin1337 opened 1 year ago

meytin1337 commented 1 year ago

When trying to load a track on a deck that already has a track loaded, it throws the following issue: Uncaught (in promise) DOMException: AudioNode.connect: Can't connect nodes from different AudioContexts. This is probably because we currently create a new audio context whenever we load a track. To preserve our filters we would probably have to preserve the audio context. Another way could be to also destroy and recreate the filters but preserve the gain values.