Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAllow sharing AudioBufferSourceNode buffer #71
Conversation
|
I am not sure if locking here is preferred over copying (in general, what I hear for real-time audio is that while copying may take longer, being deterministic makes it preferable over locking), but since we talked about sharing the buffer, I'm proposing this patch. The key parts of the DOM bindings where we are using this are here and here |
|
I don't think we should be locking here; for one there will be a process boundary here which makes locks hard to do, and for the other this means that not only can audio code block DOM (it can already), DOM code can now block audio. The way I thought we could share it would be to make it possible to send messages to the thread asking for buffer changes and asking for the buffer contents. But this has its own problems. I suspect the realtime requirements for uploading buffers are more relaxed, though, so maybe just copying is the best. Feel free to merge -- I don't have an objection to this PR; just not sure if it's the best model. |
|
We'll go with the copy approach. |
ferjm commentedJul 5, 2018
r? @Manishearth