AudioDeviceManager and CPU usage


I would like to get the CPU consumption of my audio processing. I am using the VST wrapper, but I don’t really understand how AudioDeviceManager works.

I suppose I should create one manually, initialise it, and then call setCallback but I can’t work out how to find the AudioIODeviceCallback corresponding to the processBlock of my AudioProcessor.

Thanks in advance for your help,


The simplest way is just to use a PerformanceCounter to measure the absolute time your process block takes to run…


In fact, I would like to know how much of the resources of the machine I am using, so I would really like to use getCpuUsage()

Thanks in advance,


It’s a very easy calculation - just divide the length of your process block by the time since the last process callback.