AudioDeviceManager and CPU usage


#1

Hi,
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,


#2

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


#3

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,


#4

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