Comments (2)
Further research makes it seems like this might be just how memory allocation behaves with WebAssembly. I don't know enough to say definitively though. I can make Faust IDE stop working with the same error by compiling a patch ~50 times, or compiling ~50 different patches.
from faust2webaudio.
Silly hack that circumvents the issue: put all the faust audio compilation stuff in a newly-created iframe, and remove the iframe and recreate the iframe after every compile. When the iframe is gone, it seems the resources attached to that iframe are gone too, or at the very least you get a new memory pool to use when the new iframe is loaded. I'm sure this is potentially unsuitable for many reasons, but I'm going to see how far I can take this idea 😂
How I got here: I'm making a web app that renders audio in an OfflineAudioContext
, and most nodes are dynamically compiled Faust AudioWorkletNode
s (although not using this library). I'm using a mix of mainly Faust, and a few other nodes to do things that Faust can't do like web audio's native convolution node, which is why I'm interested in OfflineAudioContexts in the first place. But after ~50 offline renders I have been hitting the same limitations as described above. It's much easier to hit this limit with offline rendering because OfflineAudioContext
s can't be reused, and new audio nodes need to be created for every new render, even if they are functionally identical, which I find to be an awkward situation. And creating all those new nodes leads to the "out of memory" error I described above. I then searched to see if anyone else hit this issue, found this library, but then realised the issue still exists here too.
from faust2webaudio.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faust2webaudio.