I am building a plugin which has a component that overlays an audio thumbnail (granular playback reader visualization). There is an AudioThumbnail component to which the parent component is added as a listener. In the AudioThumbnail documentation the following is mentioned.
The class will asynchronously scan the wavefile to create its scaled-down view, so you should make your UI repaint itself as this data comes in. To do this, the AudioThumbnail is a ChangeBroadcaster, and will broadcast a message when its listeners should repaint themselves.
The thumbnail stores an internal low-res version of the wave data, and this can be loaded and saved to avoid having to scan the file again.
Now since I need to update the UI overlay at a decent frame rate, how do I repaint the AudioThumbnail component in the most efficient way (or is there another way)? Does the thumbnail component automatically use the Cache that is passed in the constructor?