Mercurial > hg > svcore
comparison data/fft/FFTDataServer.cpp @ 155:ae9be6b6b522
* Add Thumbwheel widget for all our zooming needs
* Use QSettings to save/restore window size and position -- precursor to
switching our preferences to QSettings as well -- wish I'd noticed it sooner
* Only suspend writes (not reads from the underlying cache objects) from the
fft caches when repainting the spectrogram -- performance should now be
significantly better
author | Chris Cannam |
---|---|
date | Thu, 03 Aug 2006 15:40:11 +0000 |
parents | 6ec58bb8f729 |
children | c03ec31005e1 |
comparison
equal
deleted
inserted
replaced
154:6ec58bb8f729 | 155:ae9be6b6b522 |
---|---|
367 { | 367 { |
368 #ifdef DEBUG_FFT_SERVER | 368 #ifdef DEBUG_FFT_SERVER |
369 std::cerr << "FFTDataServer(" << this << ")::~FFTDataServer()" << std::endl; | 369 std::cerr << "FFTDataServer(" << this << ")::~FFTDataServer()" << std::endl; |
370 #endif | 370 #endif |
371 | 371 |
372 m_suspended = false; | |
372 m_exiting = true; | 373 m_exiting = true; |
373 m_condition.wakeAll(); | 374 m_condition.wakeAll(); |
374 if (m_fillThread) { | 375 if (m_fillThread) { |
375 m_fillThread->wait(); | 376 m_fillThread->wait(); |
376 delete m_fillThread; | 377 delete m_fillThread; |
406 QMutexLocker locker(&m_writeMutex); | 407 QMutexLocker locker(&m_writeMutex); |
407 m_suspended = true; | 408 m_suspended = true; |
408 for (CacheVector::iterator i = m_caches.begin(); i != m_caches.end(); ++i) { | 409 for (CacheVector::iterator i = m_caches.begin(); i != m_caches.end(); ++i) { |
409 if (*i) (*i)->suspend(); | 410 if (*i) (*i)->suspend(); |
410 } | 411 } |
412 } | |
413 | |
414 void | |
415 FFTDataServer::suspendWrites() | |
416 { | |
417 #ifdef DEBUG_FFT_SERVER | |
418 std::cerr << "FFTDataServer(" << this << "): suspendWrites" << std::endl; | |
419 #endif | |
420 m_suspended = true; | |
411 } | 421 } |
412 | 422 |
413 void | 423 void |
414 FFTDataServer::resume() | 424 FFTDataServer::resume() |
415 { | 425 { |