Mercurial > hg > svcore
diff data/fft/FFTDataServer.cpp @ 170:b23eea68357e
* flesh out StorageAdviser
author | Chris Cannam |
---|---|
date | Tue, 26 Sep 2006 12:58:12 +0000 |
parents | 04baa690f90d |
children | a2a8a2b6653a |
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp Mon Sep 25 20:32:44 2006 +0000 +++ b/data/fft/FFTDataServer.cpp Tue Sep 26 12:58:12 2006 +0000 @@ -75,12 +75,19 @@ return server; } + StorageAdviser::Criteria criteria = + StorageAdviser::Criteria + (StorageAdviser::SpeedCritical | StorageAdviser::LongRetentionLikely); - //!!! + int cells = fftSize * ((model->getEndFrame() - model->getStartFrame()) + / windowIncrement + 1); + int minimumSize = (cells / 1024) * sizeof(uint16_t); // kb + int maximumSize = (cells / 1024) * sizeof(float); // kb + + StorageAdviser::Recommendation recommendation = + StorageAdviser::recommend(criteria, minimumSize, maximumSize); - StorageAdviser::Recommendation recommendation = - StorageAdviser::recommend(StorageAdviser::Criteria(0), 0, 0); - + std::cerr << "Recommendation was: " << recommendation << std::endl; m_servers[n] = ServerCountPair (new FFTDataServer(n,