I need a simple play-head that shows the playback position of a triggered sample across a waveform drawing in my sampler plug-in.
I have already implemented this by updating an atomic samplePos variable from my samplerVoice object. The play-head UI component is on a 20 ms timer that gets the samplePos variable from the sampler’s processor and updates the UI/repaints. Though this works, it is very sluggish and does not always update correctly. Do you guys have any suggestions?
I use a FIFO for my meters, should I be using a similar system for the play-head animation?
Thanks a bunch!