I'm re-architecting my code here for a smoother UI on low power devices. I currently have a FIFO being filled on an `audioDeviceIOCallback`. I also have a Timer which calls a method that analyses the audio for pitch estimation. This timer also updates the GUI. I've realised the GUI update needs to run on a different thread, or vice versa, as currently its waiting for the calculations to finish which is longer than the frame rate on low power devices (it applies smoothing so that it looks smooth even if it doesnt get a new value every frame).
So I'm wondering how best to split things up:
Create another Thread class which performs the calculations, which can then be read by the Timer that updates the GUI.
or do the calculations on the audio thread, performing calculations when there are enough samples in the buffer and then clear and start again, updating the GUI with the Timer (this is what I had going on previously)