Public Member Functions

AudioThumbnailCache Class Reference

An instance of this class is used to manage multiple AudioThumbnail objects. More...

Inherits TimeSliceThread.

List of all members.

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.

Detailed Description

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.

See also:
AudioThumbnail

Constructor & Destructor Documentation

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.


Member Function Documentation

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.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines