X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fscopes%2Faudioscopes%2Faudiospectrum.cpp;h=63b477a3579670d5200cb1a93dd9c4dd84ef686b;hb=8a6e4eb1dea318ecd1c0b313c28b764e89a524c4;hp=a4ee112ef1cadfc5e2beb170780142c25b0105c1;hpb=b8f6dc09b4b35cab3bebb54b3d4eec0b57fb7387;p=kdenlive diff --git a/src/scopes/audioscopes/audiospectrum.cpp b/src/scopes/audioscopes/audiospectrum.cpp index a4ee112e..63b477a3 100644 --- a/src/scopes/audioscopes/audiospectrum.cpp +++ b/src/scopes/audioscopes/audiospectrum.cpp @@ -14,9 +14,8 @@ #include "lib/audio/fftTools.h" #include "lib/external/kiss_fft/tools/kiss_fftr.h" -#include #include -#include +#include #include @@ -43,19 +42,19 @@ AudioSpectrum::AudioSpectrum(QWidget *parent) : AbstractAudioScopeWidget(true, parent) - , m_fftTools() - , m_lastFFT() - , m_lastFFTLock(1) - , m_peaks() + , m_fftTools() + , m_lastFFT() + , m_lastFFTLock(1) + , m_peaks() #ifdef DEBUG_AUDIOSPEC - , m_timeTotal(0) - , m_showTotal(0) + , m_timeTotal(0) + , m_showTotal(0) #endif - , m_dBmin(-70) - , m_dBmax(0) - , m_freqMax(0) - , m_customFreq(false) - ,colorizeFactor(0) + , m_dBmin(-70) + , m_dBmax(0) + , m_freqMax(0) + , m_customFreq(false) + ,colorizeFactor(0) { ui = new Ui::AudioSpectrum_UI; ui->setupUi(this); @@ -181,7 +180,7 @@ QImage AudioSpectrum::renderAudioScope(uint, const QVector &audioFrame, if ( audioFrame.size() > 63 && m_innerScopeRect.width() > 0 && m_innerScopeRect.height() > 0 // <= 0 if widget is too small (resized by user) - ) { + ) { if (!m_customFreq) { m_freqMax = freq / 2; } @@ -503,21 +502,21 @@ QImage AudioSpectrum::renderHUD(uint) QRect AudioSpectrum::scopeRect() { m_scopeRect = QRect( - QPoint( + QPoint( 10, // Left ui->verticalSpacer->geometry().top()+6 // Top - ), - AbstractAudioScopeWidget::rect().bottomRight() - ); + ), + AbstractAudioScopeWidget::rect().bottomRight() + ); m_innerScopeRect = QRect( - QPoint( + QPoint( m_scopeRect.left()+6, // Left m_scopeRect.top()+6 // Top - ), QPoint( + ), QPoint( ui->verticalSpacer->geometry().right()-70, ui->verticalSpacer->geometry().bottom()-40 - ) - ); + ) + ); return m_scopeRect; }