<div dir="ltr"><div>Hi,</div><div><br></div><div>As IOhannes pointed it in this Github pull request (<a href="https://github.com/pure-data/pure-data/pull/81">https://github.com/pure-data/pure-data/pull/81</a>), the FFT functions in d_fft_fftsg.c are not thread-safe. An easy fix would be to set the static variables TLS (<b>PERTHREAD</b>). <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">(I</span><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial;background-color:rgb(255,255,255);float:none;display:inline">t doesn't solve the "size problem" of the original pull request but it can be complementary).</span> If it seems good for you, I will add this to the pull request dedicated to the multi-instance/multithreading problems on Github (<a href="https://github.com/pure-data/pure-data/pull/288">https://github.com/pure-data/pure-data/pull/288</a>). </div><div><br></div><div>Another solution would be to integrate these static variables in the pd instance structure (and to allocate the memory for each instance)? Nevertheless, this second solution would add <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">some </span>code pretty useless if someone use the FFTW wrapper. But is anybody using the FFTW wrapper (d_fft_fftw.c)? If this second solution seems more suitable, I can create a new pull request.</div><div><br></div><div>Cheers,</div><div>Pierre</div></div>