An instance of this class is used to manage multiple AudioThumbnail objects. More...
Inherits TimeSliceThread.
Public Member Functions | |
| AudioThumbnailCache (int maxNumThumbsToStore) | |
| Creates a cache object. | |
| ~AudioThumbnailCache () | |
| Destructor. | |
| void | clear () |
| Clears out any stored thumbnails. | |
| bool | loadThumb (AudioThumbnail &thumb, int64 hashCode) |
| Reloads the specified thumb if this cache contains the appropriate stored data. | |
| void | storeThumb (const AudioThumbnail &thumb, int64 hashCode) |
| Stores the cachable data from the specified thumb in this cache. | |
An instance of this class is used to manage multiple AudioThumbnail objects.
The cache runs a single background thread that is shared by all the thumbnails that need it, and it maintains a set of low-res previews in memory, to avoid having to re-scan audio files too often.
| AudioThumbnailCache::AudioThumbnailCache | ( | int | maxNumThumbsToStore ) | [explicit] |
Creates a cache object.
The maxNumThumbsToStore parameter lets you specify how many previews should be kept in memory at once.
| AudioThumbnailCache::~AudioThumbnailCache | ( | ) |
Destructor.
| void AudioThumbnailCache::clear | ( | ) |
Clears out any stored thumbnails.
| bool AudioThumbnailCache::loadThumb | ( | AudioThumbnail & | thumb, |
| int64 | hashCode | ||
| ) |
Reloads the specified thumb if this cache contains the appropriate stored data.
This is called automatically by the AudioThumbnail class, so you shouldn't normally need to call it directly.
| void AudioThumbnailCache::storeThumb | ( | const AudioThumbnail & | thumb, |
| int64 | hashCode | ||
| ) |
Stores the cachable data from the specified thumb in this cache.
This is called automatically by the AudioThumbnail class, so you shouldn't normally need to call it directly.