View Single Post
Old 06-21-2015, 02:52 PM   #11
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mviljamaa View Post

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.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote