Hi, thank you for the example!
I am wondering, why did you set policy.period to periodTicks/2? Shouldn’t it “just” be periodTicks, the time between two audio callbacks?
Edit:
I see that JUCE does set its audio thread to realtime, and there they use the below:
thread_time_constraint_policy_data_t policy;
policy.period = periodTicks;
policy.computation = jmin ((uint32_t) 50000, policy.period);
policy.constraint = policy.period;
policy.preemptible = true;
But then these aren’t part of workgroups of course.