add support for level meter bars for normal skin (fancy skin still uses LEDs)
This commit is contained in:
parent
fc98c545ae
commit
471d1df835
11 changed files with 163 additions and 122 deletions
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
3.5.2git
|
3.5.2git
|
||||||
|
|
||||||
|
* use audio level meter bars for normal skin
|
||||||
|
|
||||||
* store Show All Musicians setting in the ini-file
|
* store Show All Musicians setting in the ini-file
|
||||||
|
|
||||||
* improved Mac installer, coded by doloopuntil
|
* improved Mac installer, coded by doloopuntil
|
||||||
|
|
|
@ -172,11 +172,9 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
" padding-bottom: -15px; }"
|
" padding-bottom: -15px; }"
|
||||||
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
|
"QSlider::handle { image: url(:/png/fader/res/faderhandle.png); }" );
|
||||||
|
|
||||||
// mute button
|
|
||||||
pcbMute->setText ( tr ( "MUTE" ) );
|
pcbMute->setText ( tr ( "MUTE" ) );
|
||||||
|
|
||||||
// solo button
|
|
||||||
pcbSolo->setText ( tr ( "SOLO" ) );
|
pcbSolo->setText ( tr ( "SOLO" ) );
|
||||||
|
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_LED );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -184,6 +182,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign )
|
||||||
pFader->setStyleSheet ( "" );
|
pFader->setStyleSheet ( "" );
|
||||||
pcbMute->setText ( tr ( "Mute" ) );
|
pcbMute->setText ( tr ( "Mute" ) );
|
||||||
pcbSolo->setText ( tr ( "Solo" ) );
|
pcbSolo->setText ( tr ( "Solo" ) );
|
||||||
|
plbrChannelLevel->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -114,8 +114,8 @@ public:
|
||||||
bool IsRunning() { return Sound.IsRunning(); }
|
bool IsRunning() { return Sound.IsRunning(); }
|
||||||
bool SetServerAddr ( QString strNAddr );
|
bool SetServerAddr ( QString strNAddr );
|
||||||
|
|
||||||
double MicLevelL() { return SignalLevelMeter.MicLevelLeft(); }
|
double MicLeveldB_L() { return SignalLevelMeter.MicLeveldBLeft(); }
|
||||||
double MicLevelR() { return SignalLevelMeter.MicLevelRight(); }
|
double MicLeveldB_R() { return SignalLevelMeter.MicLeveldBRight(); }
|
||||||
|
|
||||||
bool GetAndResetbJitterBufferOKFlag();
|
bool GetAndResetbJitterBufferOKFlag();
|
||||||
|
|
||||||
|
|
|
@ -936,34 +936,28 @@ void CClientDlg::OnLocalMuteStateChanged ( int value )
|
||||||
void CClientDlg::OnTimerSigMet()
|
void CClientDlg::OnTimerSigMet()
|
||||||
{
|
{
|
||||||
// get current input levels
|
// get current input levels
|
||||||
double dCurSigLevelL = pClient->MicLevelL();
|
double dCurSigLeveldB_L = pClient->MicLeveldB_L();
|
||||||
double dCurSigLevelR = pClient->MicLevelR();
|
double dCurSigLeveldB_R = pClient->MicLeveldB_R();
|
||||||
|
|
||||||
// linear transformation of the input level range to the progress-bar
|
// linear transformation of the input level range to the progress-bar range
|
||||||
// range
|
dCurSigLeveldB_L -= LOW_BOUND_SIG_METER;
|
||||||
dCurSigLevelL -= LOW_BOUND_SIG_METER;
|
dCurSigLeveldB_L *= NUM_STEPS_LED_BAR / ( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
||||||
dCurSigLevelL *= NUM_STEPS_LED_BAR /
|
dCurSigLeveldB_R -= LOW_BOUND_SIG_METER;
|
||||||
( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
dCurSigLeveldB_R *= NUM_STEPS_LED_BAR / ( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
||||||
|
|
||||||
// lower bound the signal
|
// lower bound the signal
|
||||||
if ( dCurSigLevelL < 0 )
|
if ( dCurSigLeveldB_L < 0 )
|
||||||
{
|
{
|
||||||
dCurSigLevelL = 0;
|
dCurSigLeveldB_L = 0;
|
||||||
}
|
}
|
||||||
|
if ( dCurSigLeveldB_R < 0 )
|
||||||
dCurSigLevelR -= LOW_BOUND_SIG_METER;
|
|
||||||
dCurSigLevelR *= NUM_STEPS_LED_BAR /
|
|
||||||
( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
|
||||||
|
|
||||||
// lower bound the signal
|
|
||||||
if ( dCurSigLevelR < 0 )
|
|
||||||
{
|
{
|
||||||
dCurSigLevelR = 0;
|
dCurSigLeveldB_R = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// show current level
|
// show current level
|
||||||
lbrInputLevelL->setValue ( static_cast<int> ( ceil ( dCurSigLevelL ) ) );
|
lbrInputLevelL->setValue ( dCurSigLeveldB_L );
|
||||||
lbrInputLevelR->setValue ( static_cast<int> ( ceil ( dCurSigLevelR ) ) );
|
lbrInputLevelR->setValue ( dCurSigLeveldB_R );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClientDlg::OnTimerBuffersLED()
|
void CClientDlg::OnTimerBuffersLED()
|
||||||
|
@ -1187,6 +1181,8 @@ rbtReverbSelR->setStyleSheet ( "color: rgb(220, 220, 220);"
|
||||||
"font: bold;" );
|
"font: bold;" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
lbrInputLevelL->SetLevelMeterType ( CMultiColorLEDBar::MT_LED );
|
||||||
|
lbrInputLevelR->SetLevelMeterType ( CMultiColorLEDBar::MT_LED );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1199,6 +1195,8 @@ rbtReverbSelL->setStyleSheet ( "" );
|
||||||
rbtReverbSelR->setStyleSheet ( "" );
|
rbtReverbSelR->setStyleSheet ( "" );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
lbrInputLevelL->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR );
|
||||||
|
lbrInputLevelR->SetLevelMeterType ( CMultiColorLEDBar::MT_BAR );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -242,7 +242,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="CMultiColorLEDBar" name="lbrInputLevelL" native="true">
|
<widget class="CMultiColorLEDBar" name="lbrInputLevelL" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -258,7 +258,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="CMultiColorLEDBar" name="lbrInputLevelR" native="true">
|
<widget class="CMultiColorLEDBar" name="lbrInputLevelR" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
|
@ -345,8 +345,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<layout class="QHBoxLayout">
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="butConnect">
|
<widget class="QPushButton" name="butConnect">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -357,24 +355,6 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Minimum</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
|
@ -166,11 +166,6 @@ LED bar: lbr
|
||||||
// maximum number of fader settings to be stored (together with the fader tags)
|
// maximum number of fader settings to be stored (together with the fader tags)
|
||||||
#define MAX_NUM_STORED_FADER_SETTINGS 200
|
#define MAX_NUM_STORED_FADER_SETTINGS 200
|
||||||
|
|
||||||
// defines for LED level meter CMultiColorLEDBar
|
|
||||||
#define NUM_STEPS_LED_BAR 8
|
|
||||||
#define RED_BOUND_LED_BAR 7
|
|
||||||
#define YELLOW_BOUND_LED_BAR 5
|
|
||||||
|
|
||||||
// range for signal level meter
|
// range for signal level meter
|
||||||
#define LOW_BOUND_SIG_METER ( -50.0 ) // dB
|
#define LOW_BOUND_SIG_METER ( -50.0 ) // dB
|
||||||
#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB
|
#define UPPER_BOUND_SIG_METER ( 0.0 ) // dB
|
||||||
|
|
|
@ -29,39 +29,65 @@
|
||||||
|
|
||||||
|
|
||||||
/* Implementation *************************************************************/
|
/* Implementation *************************************************************/
|
||||||
CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f )
|
CMultiColorLEDBar::CMultiColorLEDBar ( QWidget* parent, Qt::WindowFlags f ) :
|
||||||
: QFrame ( parent, f )
|
QWidget ( parent, f ),
|
||||||
|
eLevelMeterType ( MT_BAR )
|
||||||
{
|
{
|
||||||
// set total number of LEDs
|
// initialize LED meter
|
||||||
iNumLEDs = NUM_STEPS_LED_BAR;
|
QWidget* pLEDMeter = new QWidget();
|
||||||
|
QVBoxLayout* pLEDLayout = new QVBoxLayout ( pLEDMeter );
|
||||||
// create layout and set spacing to zero
|
pLEDLayout->setAlignment ( Qt::AlignHCenter );
|
||||||
pMainLayout = new QVBoxLayout ( this );
|
pLEDLayout->setMargin ( 0 );
|
||||||
pMainLayout->setAlignment ( Qt::AlignHCenter );
|
pLEDLayout->setSpacing ( 0 );
|
||||||
pMainLayout->setMargin ( 0 );
|
|
||||||
pMainLayout->setSpacing ( 0 );
|
|
||||||
|
|
||||||
// create LEDs
|
// create LEDs
|
||||||
vecpLEDs.Init ( iNumLEDs );
|
vecpLEDs.Init ( NUM_STEPS_LED_BAR );
|
||||||
for ( int iLEDIdx = iNumLEDs - 1; iLEDIdx >= 0; iLEDIdx-- )
|
|
||||||
|
for ( int iLEDIdx = NUM_STEPS_LED_BAR - 1; iLEDIdx >= 0; iLEDIdx-- )
|
||||||
{
|
{
|
||||||
// create LED object
|
// create LED object
|
||||||
vecpLEDs[iLEDIdx] = new cLED ( parent );
|
vecpLEDs[iLEDIdx] = new cLED ( parent );
|
||||||
|
|
||||||
// add LED to layout with spacer (do not add spacer on the bottom of the
|
// add LED to layout with spacer (do not add spacer on the bottom of the
|
||||||
// first LED)
|
// first LED)
|
||||||
if ( iLEDIdx < iNumLEDs - 1 )
|
if ( iLEDIdx < NUM_STEPS_LED_BAR - 1 )
|
||||||
{
|
{
|
||||||
pMainLayout->addStretch();
|
pLEDLayout->addStretch();
|
||||||
}
|
}
|
||||||
pMainLayout->addWidget ( vecpLEDs[iLEDIdx]->getLabelPointer() );
|
|
||||||
|
pLEDLayout->addWidget ( vecpLEDs[iLEDIdx]->getLabelPointer() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// initialize bar meter
|
||||||
|
pProgressBar = new QProgressBar();
|
||||||
|
pProgressBar->setOrientation ( Qt::Vertical );
|
||||||
|
pProgressBar->setRange ( 0, 100 * NUM_STEPS_LED_BAR );
|
||||||
|
pProgressBar->setFormat ( "" ); // suppress percent numbers
|
||||||
|
pProgressBar->setStyleSheet (
|
||||||
|
"QProgressBar { margin: 1px;"
|
||||||
|
" padding: 1px; "
|
||||||
|
" width: 15px; }"
|
||||||
|
"QProgressBar::chunk { background: green; }" );
|
||||||
|
|
||||||
|
// setup stacked layout for meter type switching mechanism
|
||||||
|
pStackedLayout = new QStackedLayout ( this );
|
||||||
|
pStackedLayout->addWidget ( pLEDMeter );
|
||||||
|
pStackedLayout->addWidget ( pProgressBar );
|
||||||
|
|
||||||
|
// according to QScrollArea description: "When using a scroll area to display the
|
||||||
|
// contents of a custom widget, it is important to ensure that the size hint of
|
||||||
|
// the child widget is set to a suitable value."
|
||||||
|
pProgressBar->setMinimumSize ( QSize ( 1, 1 ) );
|
||||||
|
pLEDMeter->setMinimumSize ( QSize ( 1, 1 ) );
|
||||||
|
|
||||||
|
// update the meter type (using the default value of the meter type)
|
||||||
|
SetLevelMeterType ( eLevelMeterType );
|
||||||
}
|
}
|
||||||
|
|
||||||
CMultiColorLEDBar::~CMultiColorLEDBar()
|
CMultiColorLEDBar::~CMultiColorLEDBar()
|
||||||
{
|
{
|
||||||
// clean up the LED objects
|
// clean up the LED objects
|
||||||
for ( int iLEDIdx = 0; iLEDIdx < iNumLEDs; iLEDIdx++ )
|
for ( int iLEDIdx = 0; iLEDIdx < NUM_STEPS_LED_BAR; iLEDIdx++ )
|
||||||
{
|
{
|
||||||
delete vecpLEDs[iLEDIdx];
|
delete vecpLEDs[iLEDIdx];
|
||||||
}
|
}
|
||||||
|
@ -80,7 +106,7 @@ void CMultiColorLEDBar::changeEvent ( QEvent* curEvent )
|
||||||
void CMultiColorLEDBar::Reset ( const bool bEnabled )
|
void CMultiColorLEDBar::Reset ( const bool bEnabled )
|
||||||
{
|
{
|
||||||
// update state of all LEDs
|
// update state of all LEDs
|
||||||
for ( int iLEDIdx = 0; iLEDIdx < iNumLEDs; iLEDIdx++ )
|
for ( int iLEDIdx = 0; iLEDIdx < NUM_STEPS_LED_BAR; iLEDIdx++ )
|
||||||
{
|
{
|
||||||
// different reset behavoiur for enabled and disabled control
|
// different reset behavoiur for enabled and disabled control
|
||||||
if ( bEnabled )
|
if ( bEnabled )
|
||||||
|
@ -94,15 +120,34 @@ void CMultiColorLEDBar::Reset ( const bool bEnabled )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMultiColorLEDBar::setValue ( const int value )
|
void CMultiColorLEDBar::SetLevelMeterType ( const ELevelMeterType eNType )
|
||||||
|
{
|
||||||
|
eLevelMeterType = eNType;
|
||||||
|
|
||||||
|
switch ( eNType )
|
||||||
|
{
|
||||||
|
case MT_LED:
|
||||||
|
pStackedLayout->setCurrentIndex ( 0 );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MT_BAR:
|
||||||
|
pStackedLayout->setCurrentIndex ( 1 );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CMultiColorLEDBar::setValue ( const double dValue )
|
||||||
{
|
{
|
||||||
if ( this->isEnabled() )
|
if ( this->isEnabled() )
|
||||||
{
|
{
|
||||||
|
switch ( eLevelMeterType )
|
||||||
|
{
|
||||||
|
case MT_LED:
|
||||||
// update state of all LEDs for current level value
|
// update state of all LEDs for current level value
|
||||||
for ( int iLEDIdx = 0; iLEDIdx < iNumLEDs; iLEDIdx++ )
|
for ( int iLEDIdx = 0; iLEDIdx < NUM_STEPS_LED_BAR; iLEDIdx++ )
|
||||||
{
|
{
|
||||||
// set active LED color if value is above current LED index
|
// set active LED color if value is above current LED index
|
||||||
if ( iLEDIdx < value )
|
if ( iLEDIdx < dValue )
|
||||||
{
|
{
|
||||||
// check which color we should use (green, yellow or red)
|
// check which color we should use (green, yellow or red)
|
||||||
if ( iLEDIdx < YELLOW_BOUND_LED_BAR )
|
if ( iLEDIdx < YELLOW_BOUND_LED_BAR )
|
||||||
|
@ -130,6 +175,12 @@ void CMultiColorLEDBar::setValue ( const int value )
|
||||||
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
|
vecpLEDs[iLEDIdx]->setColor ( cLED::RL_GREY );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MT_BAR:
|
||||||
|
pProgressBar->setValue ( 100 * dValue );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,8 +195,7 @@ CMultiColorLEDBar::cLED::cLED ( QWidget* parent ) :
|
||||||
pLEDLabel = new QLabel ( "", parent );
|
pLEDLabel = new QLabel ( "", parent );
|
||||||
|
|
||||||
// bitmap defines minimum size of the label
|
// bitmap defines minimum size of the label
|
||||||
pLEDLabel->setMinimumSize (
|
pLEDLabel->setMinimumSize ( BitmCubeRoundGrey.width(), BitmCubeRoundGrey.height() );
|
||||||
BitmCubeRoundGrey.width(), BitmCubeRoundGrey.height() );
|
|
||||||
|
|
||||||
// set initial bitmap
|
// set initial bitmap
|
||||||
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
|
pLEDLabel->setPixmap ( BitmCubeRoundGrey );
|
||||||
|
|
|
@ -28,20 +28,36 @@
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
|
#include <QProgressBar>
|
||||||
|
#include <QStackedLayout>
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Definitions ****************************************************************/
|
||||||
|
// defines for LED level meter CMultiColorLEDBar
|
||||||
|
#define NUM_STEPS_LED_BAR 8
|
||||||
|
#define RED_BOUND_LED_BAR 7
|
||||||
|
#define YELLOW_BOUND_LED_BAR 5
|
||||||
|
|
||||||
|
|
||||||
/* Classes ********************************************************************/
|
/* Classes ********************************************************************/
|
||||||
class CMultiColorLEDBar : public QFrame
|
class CMultiColorLEDBar : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
enum ELevelMeterType
|
||||||
|
{
|
||||||
|
MT_LED,
|
||||||
|
MT_BAR
|
||||||
|
};
|
||||||
|
|
||||||
CMultiColorLEDBar ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );
|
CMultiColorLEDBar ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );
|
||||||
virtual ~CMultiColorLEDBar();
|
virtual ~CMultiColorLEDBar();
|
||||||
|
|
||||||
void setValue ( const int value );
|
void setValue ( const double dValue );
|
||||||
|
void SetLevelMeterType ( const ELevelMeterType eNType );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
class cLED
|
class cLED
|
||||||
|
@ -74,8 +90,8 @@ protected:
|
||||||
void Reset ( const bool bEnabled );
|
void Reset ( const bool bEnabled );
|
||||||
virtual void changeEvent ( QEvent* curEvent );
|
virtual void changeEvent ( QEvent* curEvent );
|
||||||
|
|
||||||
QVBoxLayout* pMainLayout;
|
QStackedLayout* pStackedLayout;
|
||||||
|
ELevelMeterType eLevelMeterType;
|
||||||
int iNumLEDs;
|
|
||||||
CVector<cLED*> vecpLEDs;
|
CVector<cLED*> vecpLEDs;
|
||||||
|
QProgressBar* pProgressBar;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1757,6 +1757,7 @@ void CServer::CreateLevelsForAllConChannels ( const int i
|
||||||
const CVector<int16_t>& vecsData = vecvecsData[j];
|
const CVector<int16_t>& vecsData = vecvecsData[j];
|
||||||
|
|
||||||
double dCurLevel = 0.0;
|
double dCurLevel = 0.0;
|
||||||
|
|
||||||
if ( vecNumAudioChannels[j] == 1 )
|
if ( vecNumAudioChannels[j] == 1 )
|
||||||
{
|
{
|
||||||
// mono
|
// mono
|
||||||
|
@ -1785,8 +1786,7 @@ void CServer::CreateLevelsForAllConChannels ( const int i
|
||||||
|
|
||||||
// map to signal level meter
|
// map to signal level meter
|
||||||
dCurSigLevel -= LOW_BOUND_SIG_METER;
|
dCurSigLevel -= LOW_BOUND_SIG_METER;
|
||||||
dCurSigLevel *= NUM_STEPS_LED_BAR /
|
dCurSigLevel *= NUM_STEPS_LED_BAR / ( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
||||||
( UPPER_BOUND_SIG_METER - LOW_BOUND_SIG_METER );
|
|
||||||
|
|
||||||
if ( dCurSigLevel < 0 )
|
if ( dCurSigLevel < 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "serverlogging.h"
|
#include "serverlogging.h"
|
||||||
#include "serverlist.h"
|
#include "serverlist.h"
|
||||||
|
#include "multicolorledbar.h"
|
||||||
#include "recorder/jamrecorder.h"
|
#include "recorder/jamrecorder.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -655,8 +655,8 @@ public:
|
||||||
CStereoSignalLevelMeter() { Reset(); }
|
CStereoSignalLevelMeter() { Reset(); }
|
||||||
|
|
||||||
void Update ( const CVector<short>& vecsAudio );
|
void Update ( const CVector<short>& vecsAudio );
|
||||||
double MicLevelLeft() { return CalcLogResult ( dCurLevelL ); }
|
double MicLeveldBLeft() { return CalcLogResult ( dCurLevelL ); }
|
||||||
double MicLevelRight() { return CalcLogResult ( dCurLevelR ); }
|
double MicLeveldBRight() { return CalcLogResult ( dCurLevelR ); }
|
||||||
static double CalcLogResult ( const double& dLinearLevel );
|
static double CalcLogResult ( const double& dLinearLevel );
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
|
|
Loading…
Reference in a new issue