mirror of
https://github.com/miek/inspectrum.git
synced 2026-03-06 08:24:29 +01:00
Use QCache to cache FFT results
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user