comparison 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
comparison
equal deleted inserted replaced
169:603991c63ff6 170:b23eea68357e
73 73
74 if ((server = findServer(npn))) { 74 if ((server = findServer(npn))) {
75 return server; 75 return server;
76 } 76 }
77 77
78 78 StorageAdviser::Criteria criteria =
79 //!!! 79 StorageAdviser::Criteria
80 80 (StorageAdviser::SpeedCritical | StorageAdviser::LongRetentionLikely);
81
82 int cells = fftSize * ((model->getEndFrame() - model->getStartFrame())
83 / windowIncrement + 1);
84 int minimumSize = (cells / 1024) * sizeof(uint16_t); // kb
85 int maximumSize = (cells / 1024) * sizeof(float); // kb
86
81 StorageAdviser::Recommendation recommendation = 87 StorageAdviser::Recommendation recommendation =
82 StorageAdviser::recommend(StorageAdviser::Criteria(0), 0, 0); 88 StorageAdviser::recommend(criteria, minimumSize, maximumSize);
83 89
90 std::cerr << "Recommendation was: " << recommendation << std::endl;
84 91
85 m_servers[n] = ServerCountPair 92 m_servers[n] = ServerCountPair
86 (new FFTDataServer(n, 93 (new FFTDataServer(n,
87 model, 94 model,
88 channel, 95 channel,