I’m making an Audio Editor, which import a single file and renders both its wave thumb and its sonogram thumb.
User can select which to draw(maybe both).
I made SonogramThumbnail
and SmartSonogramThumbnail
class, referring AudioThumbnail
and SmartAudioThumbnail
class.
Inheritance is… SmartSonogramThumnail : SonogramThumbnail : AudioThumbnailBase
I pass AudioThumbnailCache
instance to the SonogramThumb
class by calling edit.getAudioFileManager().getAudioThumbnailCache()
at SmartSonogramThumbnail’s constructor.
My problem is, there should be two types of thumbnail data stored to the disk at the same time from an AudioThumbnailCache
class.
Because those two have the same hash, SonogramThumbnail
sometimes fetches wrong file from disk e.g. when I delete a certain region, new clips are created, and AudioThumbnailCache::loadThumb()
is called.
I want to ask a good strategy to manage thumb cache datas in such a case.
Should stop storing wave thumb(which is smaller and takes less cost than making FFT datas)?
Should make another AudioThumbnailCache
instance?