comparison data/fft/FFTDataServer.cpp @ 384:6f6ab834449d spectrogram-cache-rejig

* Merge from trunk
author Chris Cannam
date Wed, 27 Feb 2008 11:59:42 +0000
parents 02d2ad95ea52
children
comparison
equal deleted inserted replaced
337:a6fab10ff9e6 384:6f6ab834449d
451 std::cerr << "FFTDataServer::modelAboutToBeDeleted: server is " 451 std::cerr << "FFTDataServer::modelAboutToBeDeleted: server is "
452 << server << std::endl; 452 << server << std::endl;
453 #endif 453 #endif
454 454
455 if (i->second.second > 0) { 455 if (i->second.second > 0) {
456 std::cerr << "ERROR: FFTDataServer::modelAboutToBeDeleted: Model " << model << " (\"" << model->objectName().toStdString() << "\") is about to be deleted, but is still being referred to by FFT server " << server << " with non-zero refcount " << i->second.second << std::endl; 456 std::cerr << "WARNING: FFTDataServer::modelAboutToBeDeleted: Model " << model << " (\"" << model->objectName().toStdString() << "\") is about to be deleted, but is still being referred to by FFT server " << server << " with non-zero refcount " << i->second.second << std::endl;
457 return;
457 } 458 }
458 for (ServerQueue::iterator j = m_releasedServers.begin(); 459 for (ServerQueue::iterator j = m_releasedServers.begin();
459 j != m_releasedServers.end(); ++j) { 460 j != m_releasedServers.end(); ++j) {
460 if (*j == server) { 461 if (*j == server) {
461 #ifdef DEBUG_FFT_SERVER 462 #ifdef DEBUG_FFT_SERVER
724 } 725 }
725 726
726 compactCache = canCompact && 727 compactCache = canCompact &&
727 (recommendation & StorageAdviser::ConserveSpace); 728 (recommendation & StorageAdviser::ConserveSpace);
728 729
730 #ifdef DEBUG_FFT_SERVER
729 std::cerr << "FFTDataServer: memory cache = " << memoryCache << ", compact cache = " << compactCache << std::endl; 731 std::cerr << "FFTDataServer: memory cache = " << memoryCache << ", compact cache = " << compactCache << std::endl;
730 732
731 #ifdef DEBUG_FFT_SERVER
732 std::cerr << "Width " << w << " of " << m_width << ", height " << h << ", size " << w * h << std::endl; 733 std::cerr << "Width " << w << " of " << m_width << ", height " << h << ", size " << w * h << std::endl;
733 #endif 734 #endif
734 } 735 }
735 736
736 FFTCache * 737 FFTCache *