Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 977:f40ccbf228c2 3.0-integration
Merge from branch simple-fft-model
author | Chris Cannam |
---|---|
date | Fri, 26 Jun 2015 14:10:18 +0100 |
parents | b8187c83b93a |
children | 64c2b3a4435a 8053c0dfa919 |
comparison
equal
deleted
inserted
replaced
974:6645b6b8356f | 977:f40ccbf228c2 |
---|---|
1627 FFTModel *model = new FFTModel(m_model, | 1627 FFTModel *model = new FFTModel(m_model, |
1628 m_channel, | 1628 m_channel, |
1629 m_windowType, | 1629 m_windowType, |
1630 m_windowSize, | 1630 m_windowSize, |
1631 getWindowIncrement(), | 1631 getWindowIncrement(), |
1632 fftSize, | 1632 fftSize); |
1633 true, // polar | |
1634 StorageAdviser::SpeedCritical, | |
1635 m_candidateFillStartFrame); | |
1636 | 1633 |
1637 if (!model->isOK()) { | 1634 if (!model->isOK()) { |
1638 QMessageBox::critical | 1635 QMessageBox::critical |
1639 (0, tr("FFT cache failed"), | 1636 (0, tr("FFT cache failed"), |
1640 tr("Failed to create the FFT model for this spectrogram.\n" | 1637 tr("Failed to create the FFT model for this spectrogram.\n" |
1652 m_sliceableModel = model; | 1649 m_sliceableModel = model; |
1653 } | 1650 } |
1654 | 1651 |
1655 m_fftModels[v] = FFTFillPair(model, 0); | 1652 m_fftModels[v] = FFTFillPair(model, 0); |
1656 | 1653 |
1657 model->resume(); | |
1658 | |
1659 delete m_updateTimer; | 1654 delete m_updateTimer; |
1660 m_updateTimer = new QTimer((SpectrogramLayer *)this); | 1655 m_updateTimer = new QTimer((SpectrogramLayer *)this); |
1661 connect(m_updateTimer, SIGNAL(timeout()), | 1656 connect(m_updateTimer, SIGNAL(timeout()), |
1662 this, SLOT(fillTimerTimedOut())); | 1657 this, SLOT(fillTimerTimedOut())); |
1663 m_updateTimer->start(200); | 1658 m_updateTimer->start(200); |
2443 if (!m_synchronous) { | 2438 if (!m_synchronous) { |
2444 m_lastPaintBlockWidth = paintBlockWidth; | 2439 m_lastPaintBlockWidth = paintBlockWidth; |
2445 (void)gettimeofday(&tv, 0); | 2440 (void)gettimeofday(&tv, 0); |
2446 m_lastPaintTime = RealTime::fromTimeval(tv) - mainPaintStart; | 2441 m_lastPaintTime = RealTime::fromTimeval(tv) - mainPaintStart; |
2447 } | 2442 } |
2448 | |
2449 //!!! if (fftSuspended) fft->resume(); | |
2450 } | 2443 } |
2451 | 2444 |
2452 bool | 2445 bool |
2453 SpectrogramLayer::paintDrawBufferPeakFrequencies(View *v, | 2446 SpectrogramLayer::paintDrawBufferPeakFrequencies(View *v, |
2454 int w, | 2447 int w, |