Update UI 60 times per second (#4570)
* Update UI 60 times per second * Adjust falloff values
This commit is contained in:
committed by
Hyunjin Song
parent
153f15f4b4
commit
dd7b0865fb
@@ -80,7 +80,7 @@ private slots:
|
||||
{
|
||||
const float opl = getPeak_L();
|
||||
const float opr = getPeak_R();
|
||||
const float fall_off = 1.2;
|
||||
const float fallOff = 1.07;
|
||||
if( *m_lPeak > opl )
|
||||
{
|
||||
setPeak_L( *m_lPeak );
|
||||
@@ -88,7 +88,7 @@ private slots:
|
||||
}
|
||||
else
|
||||
{
|
||||
setPeak_L( opl/fall_off );
|
||||
setPeak_L( opl/fallOff );
|
||||
}
|
||||
|
||||
if( *m_rPeak > opr )
|
||||
@@ -98,7 +98,7 @@ private slots:
|
||||
}
|
||||
else
|
||||
{
|
||||
setPeak_R( opr/fall_off );
|
||||
setPeak_R( opr/fallOff );
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ void EqSpectrumView::paintEvent(QPaintEvent *event)
|
||||
float peak;
|
||||
m_path.moveTo( 0, height() );
|
||||
m_peakSum = 0;
|
||||
float fallOff = 1.2;
|
||||
const float fallOff = 1.07;
|
||||
for( int x = 0; x < MAX_BANDS; ++x, ++bands )
|
||||
{
|
||||
peak = ( fh * 2.0 / 3.0 * ( 20 * ( log10( *bands / energy ) ) - LOWER_Y ) / ( - LOWER_Y ) );
|
||||
|
||||
Reference in New Issue
Block a user