Mercurial > hg > svcore
changeset 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 | 059b0322009c |
files | data/fft/FFTDataServer.cpp data/fft/FFTDataServer.h data/model/FFTModel.h |
diffstat | 3 files changed, 12 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/data/fft/FFTDataServer.cpp Thu Aug 03 12:42:15 2006 +0000 +++ b/data/fft/FFTDataServer.cpp Thu Aug 03 15:40:11 2006 +0000 @@ -369,6 +369,7 @@ std::cerr << "FFTDataServer(" << this << ")::~FFTDataServer()" << std::endl; #endif + m_suspended = false; m_exiting = true; m_condition.wakeAll(); if (m_fillThread) { @@ -411,6 +412,15 @@ } void +FFTDataServer::suspendWrites() +{ +#ifdef DEBUG_FFT_SERVER + std::cerr << "FFTDataServer(" << this << "): suspendWrites" << std::endl; +#endif + m_suspended = true; +} + +void FFTDataServer::resume() { #ifdef DEBUG_FFT_SERVER
--- a/data/fft/FFTDataServer.h Thu Aug 03 12:42:15 2006 +0000 +++ b/data/fft/FFTDataServer.h Thu Aug 03 15:40:11 2006 +0000 @@ -74,6 +74,7 @@ bool isColumnReady(size_t x); void suspend(); + void suspendWrites(); void resume(); // also happens automatically if new data needed // Convenience functions:
--- a/data/model/FFTModel.h Thu Aug 03 12:42:15 2006 +0000 +++ b/data/model/FFTModel.h Thu Aug 03 15:40:11 2006 +0000 @@ -101,6 +101,7 @@ virtual Model *clone() const; virtual void suspend() { m_server->suspend(); } + virtual void suspendWrites() { m_server->suspendWrites(); } virtual void resume() { m_server->resume(); } private: