I’m stuck with a problem that I can’t seem to solve: I’ve noticed that whenever a lot of painting goes on in my app, the CPU usage inside the audioDeviceIOCallback() goes up, which seems weird, as the GUI thread has lower priority. So whenever I move or zoom a lot in my sequencer, the shown CPU usage goes up. I’ve gone so far to create an animated component of huge size (800x800) that paints when one clicks on it and stops again when one clicks on it, and I can clearly see that whenever the animation is going on, the CPU usage inside the ASIO callback goes up.
How is this possible? I’ve tried lowering the GUI thread’s priority, it doesn’t help. I’ve also tried increasing the process’ priority, it doesn’t help either.
A few more things to note:
- On the same machine with Ableton Live, even under heavy ASIO CPU usage, the same problem cannot be seen, so I can move things around and zoom as much as I like, it doesn’t change the ASIO callback CPU usage. It is also worth to note that Ableton never did produce any audio dropouts/crackles when zooming stuff.
- Another weird thing is that when I check CPU usage in the Task Manager while zooming in my sequencer, CPU usage goes up on both processor cores. That doesn’t make any sense to me either, because the GUI thread can only be running on 1 single core at the same time, or am I wrong?
- Zooming in my sequencer also led to heavy audio drops and crackles, but after I set the component that gets redrawn (the MIDI key editor) to be opaque, the audio drops were gone, although the CPU usage in the ASIO callback stayed the same.
My machine is a dual Pentium4 3.2GHz on Windows XP SP2. This was with JUCE146, but I’ll try with 151 soon. I’ve tried with the onboard graphics card, and an NVIDIA card. It’s always the same. So, I don’t think the problem is related to the graphics card.