letz at grame.fr
Tue Sep 22 08:32:03 PDT 2015
- we generate optimized asm.js code from a Domain Specific Language (actually an asm.js module for the audio code itself + some additional standard JS functions)
- the asm.js module contains a "compute" function that receive an array of input float buffers, process them, and returns an array of output float buffers.
- the array of input float buffers is typically got from a realtime CoreAudio audio callback, and the array of output float buffers has to be given back to the callback. So we would basically need to transfer C float arrays to the asm.js code and back.
Now the questions :
- since the asm.js code does not allocate memory, we hope calling the asm.js "compute" function directly form the CoreAudio callback will work, so basically that asm.js code can be called from a real-time callback. Is that a correct assumption?
Thanks for any advance or code example to look at.
More information about the webkit-dev