comparison data/fft/FFTDataServer.cpp @ 157:c03ec31005e1

* Add zoom thumbwheels to Pane. Implement horizontal thumbwheel, and vertical depending on layer type (supported for waveform and spectrogram, though wrong for log-scale spectrogram at the moment). * Add bare bones of a spectrum layer. * Add window icon * Add shortcut for "insert time instant" on laptops without keypad enter (";") * Delete FFT processing thread when it exits (at least, next time we're asked for something interesting) * Get audio file extensions from the file readers, and thus from libsndfile for the wave file reader -- leads to rather a wide combo box in file dialog though * Better refresh order for spectrogram (redraw centre section first)
author Chris Cannam
date Fri, 04 Aug 2006 17:01:37 +0000
parents ae9be6b6b522
children e5879045d22b
comparison
equal deleted inserted replaced
156:059b0322009c 157:c03ec31005e1
357 std::cerr << "ERROR: fftwf_plan_dft_r2c_1d(" << m_windowSize << ") failed!" << std::endl; 357 std::cerr << "ERROR: fftwf_plan_dft_r2c_1d(" << m_windowSize << ") failed!" << std::endl;
358 throw(0); 358 throw(0);
359 } 359 }
360 360
361 m_fillThread = new FillThread(*this, fillFromColumn); 361 m_fillThread = new FillThread(*this, fillFromColumn);
362
363 //!!! respond appropriately when thread exits (deleteProcessingData etc)
364 } 362 }
365 363
366 FFTDataServer::~FFTDataServer() 364 FFTDataServer::~FFTDataServer()
367 { 365 {
368 #ifdef DEBUG_FFT_SERVER 366 #ifdef DEBUG_FFT_SERVER
425 { 423 {
426 #ifdef DEBUG_FFT_SERVER 424 #ifdef DEBUG_FFT_SERVER
427 std::cerr << "FFTDataServer(" << this << "): resume" << std::endl; 425 std::cerr << "FFTDataServer(" << this << "): resume" << std::endl;
428 #endif 426 #endif
429 m_suspended = false; 427 m_suspended = false;
430 m_condition.wakeAll(); 428 if (m_fillThread) {
429 if (m_fillThread->isFinished()) {
430 delete m_fillThread;
431 m_fillThread = 0;
432 deleteProcessingData();
433 } else {
434 m_condition.wakeAll();
435 }
436 }
431 } 437 }
432 438
433 FFTCache * 439 FFTCache *
434 FFTDataServer::getCacheAux(size_t c) 440 FFTDataServer::getCacheAux(size_t c)
435 { 441 {