nick1
May 15, 2014, 6:54am
4
It sounds like you’re overflowing the async command buffer, especially with your 1ms sleep before setting all the parameters again. I don’t know if that’s indicative of your real workload, or just part of your test. Try increasing the async command buffer size.
From the docs:
In asynchronous mode, the Studio processing occurs every 20ms and is triggered off the low level mixer. The low level mix is split into parts, premix, midmix and postmix. It is the low level premix that executes any enqueued low level commands and updates DSP clocks. By triggering the asynchronous Studio processing at the end of the premix, Studio can assume that the mix isn’t going to jump in as the asynchronous update is executing. Unlike the first case, Studio can also assume that the update will be called in a timely manner, even if the game’s main thread has a framerate spike.
The size of the Studio asynchronous command buffer can be customised by calling Studio::System::setAdvancedSettings. It there is not enough space for commands, then a stall will occur until the asynchronous update has consumed enough commands. Studio::System::getBufferUsage can be used to measure if any stalls have occurred due to the command buffer not being large enough.