Float denormals handing in audioworklet ?

Hi,

We have developed a WebAssembly backend in the Faust (http://faust.grame.fr) audio DSP language (http://faust.grame.fr/news/2017/01/13/faust-webassembly.html). Then we connect the generated « DSP as a WebAssembly module » in a Web Audio ScripProcessor node. 

Testing this code with various DSP and in particular physical models, we see a lot of float denormals. We « solve » the problem by doing an automatic software Flush To Zero in the generated code. This solution helps but is not satisfactory, since we would prefer to have hardware FTZ activated in the first place, as we can do in C/C++ code (on Intel for instance using this kind of flags #define AVOIDDENORMALS _mm_setcsr(_mm_getcsr() | 0x8040))

When we raised this float denormals issue years ago with our Faust asm.js backend, the answer basically was that JavaScript would not support FTZ control in the near future

What will be the situation with audioworklet ? Since we understand the audio code will be computed in a special real-time worker thread, then this thread could be set with hardware FTZ ? Is it specified somewhere?

Regards

Stéphane Letz

Received on Thursday, 13 July 2017 11:05:30 UTC