Use QCache to cache FFT results

This commit is contained in:
Mike Walters
2015-09-11 20:10:16 +01:00
parent 3119692ba0
commit de9be20257
2 changed files with 5 additions and 4 deletions

View File

@@ -98,9 +98,9 @@ void Spectrogram::paintEvent(QPaintEvent *event)
float* Spectrogram::getTile(off_t tile)
{
auto iter = fftCache.find(qMakePair(fftSize, tile));
if (iter != fftCache.end())
return iter.value();
float *obj = fftCache.object(qMakePair(fftSize, tile));
if (obj != 0)
return obj;
float *dest = new float[tileSize];
float *ptr = dest;