Quote:
Originally Posted by mviljamaa
My queues are of type std::vector<std::queue<double*>> where the outer vector holds the channels and the queue the audio for any particular channel.
|
Based on my own experiments, std::queue isn't a good choice for audio DSP work, it indeed is relatively slow for shuffling around data like doubles. I've myself used the WDL_FastQueue. It however is relatively painful to use because it works with bytes as the data elements. So you have to remember to deal with that...
However, I wonder...Why is the innermost type in your data structure a double*? Plain direct double should be enough! How are you inserting the double*'s into the queue? Surely not by doing something like "new double"? Because that would be crazy slow(*) to do! And not recommended to be done inside the audio processing threads, anyway.
(*) At least in the worst case scenarios.
Also remember to test your plugin's CPU load characteristics only with optimized release builds. Debug builds are never going to be fast and they are not intended to be that. They are meant to debug problems in your code.