On Thursday, 2 July 2020 at 13:03:12 UTC, Guillaume Piolat wrote:
On Thursday, 2 July 2020 at 11:13:41 UTC, claptrap wrote:

If you're doing a plugin the host callback thread wont be known to the D runtime and so the GC wont pause it. So as long as you dont call anything that might trigger the GC while in the callback you wont get GC pauses affecting the audio rendering.

That was how we did it for a while, the speed hit was immeasurable.

Generally, if a callback thread can own GC things, it needs to be registered and deregistered at exit.

I think my post was unclear, I'm saying keep the realtime thread hidden, just make sure any references are either duplicated somewhere reachable by the GC, or only give the real time thread malloced memory.

Chances are almost all the memory the audio thread has references to will be referenced elsewhere anyway. And those that arnt, say a message object passed through a queue, just use malloced memory.


Reply via email to