From f2cd5348b0e31ecfcbb6c758b1c7a0bb2903e064 Mon Sep 17 00:00:00 2001 From: Tarmo Johannes Date: Sun, 17 May 2020 15:51:01 +0300 Subject: [PATCH] Cahanges according to pull request comments. --- src/audiomixerboard.cpp | 178 +--------------------------------------- src/audiomixerboard.h | 129 ----------------------------- src/channel.cpp | 2 +- src/protocol.h | 2 +- 4 files changed, 3 insertions(+), 308 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 9c0a6702..01969ffb 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -103,7 +103,6 @@ CChannelFader::CChannelFader ( QWidget* pNW, pMuteSoloGrid->addWidget ( pcbMute, 0, Qt::AlignLeft ); pMuteSoloGrid->addWidget ( pcbSolo, 0, Qt::AlignLeft ); - //TODO: Pan row: "L" slider "R" pMainGrid->addWidget ( pPan, 0, Qt::AlignCenter ); pMainGrid->addWidget ( pLevelsBox, 0, Qt::AlignHCenter ); pMainGrid->addWidget ( pMuteSoloBox, 0, Qt::AlignHCenter ); @@ -128,7 +127,7 @@ CChannelFader::CChannelFader ( QWidget* pNW, pFader->setAccessibleName ( tr ( "Local mix level setting of the current audio " "channel at the server" ) ); - pPan->setWhatsThis ( tr ( "Panning: Sets the panning position from Left to Right of the channel. " + pPan->setWhatsThis ( "" + tr ( "Panning") + ":" + tr ( "Sets the panning position from Left to Right of the channel. " " Works only in stero or preferably mono in/stereo out mode." ) ); pPan->setAccessibleName ( tr ( "Local panning position of the current audio channel at the server" ) ); @@ -596,169 +595,7 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) : // Connections ------------------------------------------------------------- - -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) connectFaderSignalsToMixerBoardSlots(); - -#else - // CODE TAG: MAX_NUM_CHANNELS_TAG - // make sure we have MAX_NUM_CHANNELS connections!!! - QObject::connect ( vecpChanFader[0], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh0 ( double ) ) ); - QObject::connect ( vecpChanFader[1], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh1 ( double ) ) ); - QObject::connect ( vecpChanFader[2], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh2 ( double ) ) ); - QObject::connect ( vecpChanFader[3], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh3 ( double ) ) ); - QObject::connect ( vecpChanFader[4], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh4 ( double ) ) ); - QObject::connect ( vecpChanFader[5], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh5 ( double ) ) ); - QObject::connect ( vecpChanFader[6], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh6 ( double ) ) ); - QObject::connect ( vecpChanFader[7], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh7 ( double ) ) ); - QObject::connect ( vecpChanFader[8], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh8 ( double ) ) ); - QObject::connect ( vecpChanFader[9], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh9 ( double ) ) ); - QObject::connect ( vecpChanFader[10], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh10 ( double ) ) ); - QObject::connect ( vecpChanFader[11], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh11 ( double ) ) ); - QObject::connect ( vecpChanFader[12], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh12 ( double ) ) ); - QObject::connect ( vecpChanFader[13], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh13 ( double ) ) ); - QObject::connect ( vecpChanFader[14], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh14 ( double ) ) ); - QObject::connect ( vecpChanFader[15], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh15 ( double ) ) ); - QObject::connect ( vecpChanFader[16], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh16 ( double ) ) ); - QObject::connect ( vecpChanFader[17], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh17 ( double ) ) ); - QObject::connect ( vecpChanFader[18], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh18 ( double ) ) ); - QObject::connect ( vecpChanFader[19], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh19 ( double ) ) ); - QObject::connect ( vecpChanFader[20], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh20 ( double ) ) ); - QObject::connect ( vecpChanFader[21], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh21 ( double ) ) ); - QObject::connect ( vecpChanFader[22], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh22 ( double ) ) ); - QObject::connect ( vecpChanFader[23], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh23 ( double ) ) ); - QObject::connect ( vecpChanFader[24], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh24 ( double ) ) ); - QObject::connect ( vecpChanFader[25], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh25 ( double ) ) ); - QObject::connect ( vecpChanFader[26], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh26 ( double ) ) ); - QObject::connect ( vecpChanFader[27], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh27 ( double ) ) ); - QObject::connect ( vecpChanFader[28], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh28 ( double ) ) ); - QObject::connect ( vecpChanFader[29], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh29 ( double ) ) ); - QObject::connect ( vecpChanFader[30], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh30 ( double ) ) ); - QObject::connect ( vecpChanFader[31], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh31 ( double ) ) ); - QObject::connect ( vecpChanFader[32], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh32 ( double ) ) ); - QObject::connect ( vecpChanFader[33], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh33 ( double ) ) ); - QObject::connect ( vecpChanFader[34], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh34 ( double ) ) ); - QObject::connect ( vecpChanFader[35], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh35 ( double ) ) ); - QObject::connect ( vecpChanFader[36], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh36 ( double ) ) ); - QObject::connect ( vecpChanFader[37], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh37 ( double ) ) ); - QObject::connect ( vecpChanFader[38], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh38 ( double ) ) ); - QObject::connect ( vecpChanFader[39], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh39 ( double ) ) ); - QObject::connect ( vecpChanFader[40], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh40 ( double ) ) ); - QObject::connect ( vecpChanFader[41], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh41 ( double ) ) ); - QObject::connect ( vecpChanFader[42], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh42 ( double ) ) ); - QObject::connect ( vecpChanFader[43], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh43 ( double ) ) ); - QObject::connect ( vecpChanFader[44], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh44 ( double ) ) ); - QObject::connect ( vecpChanFader[45], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh45 ( double ) ) ); - QObject::connect ( vecpChanFader[46], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh46 ( double ) ) ); - QObject::connect ( vecpChanFader[47], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh47 ( double ) ) ); - QObject::connect ( vecpChanFader[48], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh48 ( double ) ) ); - QObject::connect ( vecpChanFader[49], SIGNAL ( gainValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh49 ( double ) ) ); - -//Pans: ---- - QObject::connect ( vecpChanFader[0], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh0 ( double ) ) ); - QObject::connect ( vecpChanFader[1], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh1 ( double ) ) ); - QObject::connect ( vecpChanFader[2], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh2 ( double ) ) ); - QObject::connect ( vecpChanFader[3], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh3 ( double ) ) ); - QObject::connect ( vecpChanFader[4], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh4 ( double ) ) ); - QObject::connect ( vecpChanFader[5], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh5 ( double ) ) ); - QObject::connect ( vecpChanFader[6], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh6 ( double ) ) ); - QObject::connect ( vecpChanFader[7], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh7 ( double ) ) ); - QObject::connect ( vecpChanFader[8], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh8 ( double ) ) ); - QObject::connect ( vecpChanFader[9], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh9 ( double ) ) ); - QObject::connect ( vecpChanFader[10], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh10 ( double ) ) ); - QObject::connect ( vecpChanFader[11], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh11 ( double ) ) ); - QObject::connect ( vecpChanFader[12], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh12 ( double ) ) ); - QObject::connect ( vecpChanFader[13], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh13 ( double ) ) ); - QObject::connect ( vecpChanFader[14], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh14 ( double ) ) ); - QObject::connect ( vecpChanFader[15], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh15 ( double ) ) ); - QObject::connect ( vecpChanFader[16], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh16 ( double ) ) ); - QObject::connect ( vecpChanFader[17], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh17 ( double ) ) ); - QObject::connect ( vecpChanFader[18], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh18 ( double ) ) ); - QObject::connect ( vecpChanFader[19], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh19 ( double ) ) ); - QObject::connect ( vecpChanFader[20], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh20 ( double ) ) ); - QObject::connect ( vecpChanFader[21], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh21 ( double ) ) ); - QObject::connect ( vecpChanFader[22], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh22 ( double ) ) ); - QObject::connect ( vecpChanFader[23], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh23 ( double ) ) ); - QObject::connect ( vecpChanFader[24], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh24 ( double ) ) ); - QObject::connect ( vecpChanFader[25], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh25 ( double ) ) ); - QObject::connect ( vecpChanFader[26], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh26 ( double ) ) ); - QObject::connect ( vecpChanFader[27], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh27 ( double ) ) ); - QObject::connect ( vecpChanFader[28], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh28 ( double ) ) ); - QObject::connect ( vecpChanFader[29], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh29 ( double ) ) ); - QObject::connect ( vecpChanFader[30], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh30 ( double ) ) ); - QObject::connect ( vecpChanFader[31], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh31 ( double ) ) ); - QObject::connect ( vecpChanFader[32], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh32 ( double ) ) ); - QObject::connect ( vecpChanFader[33], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh33 ( double ) ) ); - QObject::connect ( vecpChanFader[34], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh34 ( double ) ) ); - QObject::connect ( vecpChanFader[35], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh35 ( double ) ) ); - QObject::connect ( vecpChanFader[36], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh36 ( double ) ) ); - QObject::connect ( vecpChanFader[37], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh37 ( double ) ) ); - QObject::connect ( vecpChanFader[38], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh38 ( double ) ) ); - QObject::connect ( vecpChanFader[39], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh39 ( double ) ) ); - QObject::connect ( vecpChanFader[40], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh40 ( double ) ) ); - QObject::connect ( vecpChanFader[41], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh41 ( double ) ) ); - QObject::connect ( vecpChanFader[42], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh42 ( double ) ) ); - QObject::connect ( vecpChanFader[43], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh43 ( double ) ) ); - QObject::connect ( vecpChanFader[44], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh44 ( double ) ) ); - QObject::connect ( vecpChanFader[45], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh45 ( double ) ) ); - QObject::connect ( vecpChanFader[46], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh46 ( double ) ) ); - QObject::connect ( vecpChanFader[47], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh47 ( double ) ) ); - QObject::connect ( vecpChanFader[48], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnpanValueChangedCh48 ( double ) ) ); - QObject::connect ( vecpChanFader[49], SIGNAL ( panValueChanged ( double ) ), this, SLOT ( OnGainValueChangedCh49 ( double ) ) ); - - QObject::connect ( vecpChanFader[0], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[1], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[2], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[3], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[4], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[5], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[6], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[7], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[8], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[9], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[10], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[11], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[12], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[13], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[14], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[15], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[16], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[17], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[18], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[19], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[20], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[21], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[22], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[23], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[24], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[25], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[26], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[27], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[28], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[29], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[30], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[31], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[32], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[33], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[34], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[35], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[36], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[37], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[38], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[39], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[40], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[41], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[42], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[43], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[44], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[45], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[46], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[47], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[48], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - QObject::connect ( vecpChanFader[49], SIGNAL ( soloStateChanged ( int ) ), this, SLOT ( OnChSoloStateChanged() ) ); - -#endif - } template @@ -1002,19 +839,6 @@ void CAudioMixerBoard::UpdatePanValue ( const int iChannelIdx, emit ChangeChanPan ( iChannelIdx, dValue ); } -void CAudioMixerBoard::OnPanValueChanged ( const double dValue ) -{ - - // get channel index from sender according t, this SHOULD coincide with the chanID. - CChannelFader * channelFader = qobject_cast(sender()); - if (!channelFader) { - return; - } - // a clumsy way to find the index. Why not to use QList or QVector and indexOf? - CVector::iterator it = std::find(vecpChanFader.begin(), vecpChanFader.end(), channelFader); - int iChannelIdx = static_cast( std::distance(vecpChanFader.begin(), it) ); //static_cast(it); - emit ChangeChanPan ( iChannelIdx, dValue ); -} void CAudioMixerBoard::StoreFaderSettings ( CChannelFader* pChanFader ) { diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index 8868d15c..e59aeaf4 100644 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -107,7 +107,6 @@ signals: void soloStateChanged ( int value ); }; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) template class CAudioMixerBoardSlots : public CAudioMixerBoardSlots { @@ -125,11 +124,6 @@ protected: template<> class CAudioMixerBoardSlots<0> {}; -#else -template -class CAudioMixerBoardSlots {}; -#endif - class CAudioMixerBoard : public QScrollArea, @@ -179,7 +173,6 @@ protected: bool bNoFaderVisible; QString strServerName; -#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) virtual void UpdateGainValue ( const int iChannelIdx, const double dValue ); virtual void UpdatePanValue ( const int iChannelIdx, @@ -188,128 +181,6 @@ protected: template inline void connectFaderSignalsToMixerBoardSlots(); -#else - void UpdateGainValue ( const int iChannelIdx, - const double dValue ); - - void UpdatePanValue ( const int iChannelIdx, - const double dValue ); - - -#endif - -public slots: - void OnPanValueChanged ( const double dValue ); - -#if QT_VERSION < 0x50000 // MOC does not expand macros in Qt 4, so we cannot use QT_VERSION_CHECK(5, 0, 0) - // CODE TAG: MAX_NUM_CHANNELS_TAG - // make sure we have MAX_NUM_CHANNELS connections!!! - void OnGainValueChangedCh0 ( double dValue ) { UpdateGainValue ( 0, dValue ); } - void OnGainValueChangedCh1 ( double dValue ) { UpdateGainValue ( 1, dValue ); } - void OnGainValueChangedCh2 ( double dValue ) { UpdateGainValue ( 2, dValue ); } - void OnGainValueChangedCh3 ( double dValue ) { UpdateGainValue ( 3, dValue ); } - void OnGainValueChangedCh4 ( double dValue ) { UpdateGainValue ( 4, dValue ); } - void OnGainValueChangedCh5 ( double dValue ) { UpdateGainValue ( 5, dValue ); } - void OnGainValueChangedCh6 ( double dValue ) { UpdateGainValue ( 6, dValue ); } - void OnGainValueChangedCh7 ( double dValue ) { UpdateGainValue ( 7, dValue ); } - void OnGainValueChangedCh8 ( double dValue ) { UpdateGainValue ( 8, dValue ); } - void OnGainValueChangedCh9 ( double dValue ) { UpdateGainValue ( 9, dValue ); } - void OnGainValueChangedCh10 ( double dValue ) { UpdateGainValue ( 10, dValue ); } - void OnGainValueChangedCh11 ( double dValue ) { UpdateGainValue ( 11, dValue ); } - void OnGainValueChangedCh12 ( double dValue ) { UpdateGainValue ( 12, dValue ); } - void OnGainValueChangedCh13 ( double dValue ) { UpdateGainValue ( 13, dValue ); } - void OnGainValueChangedCh14 ( double dValue ) { UpdateGainValue ( 14, dValue ); } - void OnGainValueChangedCh15 ( double dValue ) { UpdateGainValue ( 15, dValue ); } - void OnGainValueChangedCh16 ( double dValue ) { UpdateGainValue ( 16, dValue ); } - void OnGainValueChangedCh17 ( double dValue ) { UpdateGainValue ( 17, dValue ); } - void OnGainValueChangedCh18 ( double dValue ) { UpdateGainValue ( 18, dValue ); } - void OnGainValueChangedCh19 ( double dValue ) { UpdateGainValue ( 19, dValue ); } - void OnGainValueChangedCh20 ( double dValue ) { UpdateGainValue ( 20, dValue ); } - void OnGainValueChangedCh21 ( double dValue ) { UpdateGainValue ( 21, dValue ); } - void OnGainValueChangedCh22 ( double dValue ) { UpdateGainValue ( 22, dValue ); } - void OnGainValueChangedCh23 ( double dValue ) { UpdateGainValue ( 23, dValue ); } - void OnGainValueChangedCh24 ( double dValue ) { UpdateGainValue ( 24, dValue ); } - void OnGainValueChangedCh25 ( double dValue ) { UpdateGainValue ( 25, dValue ); } - void OnGainValueChangedCh26 ( double dValue ) { UpdateGainValue ( 26, dValue ); } - void OnGainValueChangedCh27 ( double dValue ) { UpdateGainValue ( 27, dValue ); } - void OnGainValueChangedCh28 ( double dValue ) { UpdateGainValue ( 28, dValue ); } - void OnGainValueChangedCh29 ( double dValue ) { UpdateGainValue ( 29, dValue ); } - void OnGainValueChangedCh30 ( double dValue ) { UpdateGainValue ( 30, dValue ); } - void OnGainValueChangedCh31 ( double dValue ) { UpdateGainValue ( 31, dValue ); } - void OnGainValueChangedCh32 ( double dValue ) { UpdateGainValue ( 32, dValue ); } - void OnGainValueChangedCh33 ( double dValue ) { UpdateGainValue ( 33, dValue ); } - void OnGainValueChangedCh34 ( double dValue ) { UpdateGainValue ( 34, dValue ); } - void OnGainValueChangedCh35 ( double dValue ) { UpdateGainValue ( 35, dValue ); } - void OnGainValueChangedCh36 ( double dValue ) { UpdateGainValue ( 36, dValue ); } - void OnGainValueChangedCh37 ( double dValue ) { UpdateGainValue ( 37, dValue ); } - void OnGainValueChangedCh38 ( double dValue ) { UpdateGainValue ( 38, dValue ); } - void OnGainValueChangedCh39 ( double dValue ) { UpdateGainValue ( 39, dValue ); } - void OnGainValueChangedCh40 ( double dValue ) { UpdateGainValue ( 40, dValue ); } - void OnGainValueChangedCh41 ( double dValue ) { UpdateGainValue ( 41, dValue ); } - void OnGainValueChangedCh42 ( double dValue ) { UpdateGainValue ( 42, dValue ); } - void OnGainValueChangedCh43 ( double dValue ) { UpdateGainValue ( 43, dValue ); } - void OnGainValueChangedCh44 ( double dValue ) { UpdateGainValue ( 44, dValue ); } - void OnGainValueChangedCh45 ( double dValue ) { UpdateGainValue ( 45, dValue ); } - void OnGainValueChangedCh46 ( double dValue ) { UpdateGainValue ( 46, dValue ); } - void OnGainValueChangedCh47 ( double dValue ) { UpdateGainValue ( 47, dValue ); } - void OnGainValueChangedCh48 ( double dValue ) { UpdateGainValue ( 48, dValue ); } - void OnGainValueChangedCh49 ( double dValue ) { UpdateGainValue ( 49, dValue ); } - - void OnpanValueChangedCh0 ( double dValue ) { UpdatePanValue ( 0, dValue ); } - void OnpanValueChangedCh1 ( double dValue ) { UpdatePanValue ( 1, dValue ); } - void OnpanValueChangedCh2 ( double dValue ) { UpdatePanValue ( 2, dValue ); } - void OnpanValueChangedCh3 ( double dValue ) { UpdatePanValue ( 3, dValue ); } - void OnpanValueChangedCh4 ( double dValue ) { UpdatePanValue ( 4, dValue ); } - void OnpanValueChangedCh5 ( double dValue ) { UpdatePanValue ( 5, dValue ); } - void OnpanValueChangedCh6 ( double dValue ) { UpdatePanValue ( 6, dValue ); } - void OnpanValueChangedCh7 ( double dValue ) { UpdatePanValue ( 7, dValue ); } - void OnpanValueChangedCh8 ( double dValue ) { UpdatePanValue ( 8, dValue ); } - void OnpanValueChangedCh9 ( double dValue ) { UpdatePanValue ( 9, dValue ); } - void OnpanValueChangedCh10 ( double dValue ) { UpdatePanValue ( 10, dValue ); } - void OnpanValueChangedCh11 ( double dValue ) { UpdatePanValue ( 11, dValue ); } - void OnpanValueChangedCh12 ( double dValue ) { UpdatePanValue ( 12, dValue ); } - void OnpanValueChangedCh13 ( double dValue ) { UpdatePanValue ( 13, dValue ); } - void OnpanValueChangedCh14 ( double dValue ) { UpdatePanValue ( 14, dValue ); } - void OnpanValueChangedCh15 ( double dValue ) { UpdatePanValue ( 15, dValue ); } - void OnpanValueChangedCh16 ( double dValue ) { UpdatePanValue ( 16, dValue ); } - void OnpanValueChangedCh17 ( double dValue ) { UpdatePanValue ( 17, dValue ); } - void OnpanValueChangedCh18 ( double dValue ) { UpdatePanValue ( 18, dValue ); } - void OnpanValueChangedCh19 ( double dValue ) { UpdatePanValue ( 19, dValue ); } - void OnpanValueChangedCh20 ( double dValue ) { UpdatePanValue ( 20, dValue ); } - void OnpanValueChangedCh21 ( double dValue ) { UpdatePanValue ( 21, dValue ); } - void OnpanValueChangedCh22 ( double dValue ) { UpdatePanValue ( 22, dValue ); } - void OnpanValueChangedCh23 ( double dValue ) { UpdatePanValue ( 23, dValue ); } - void OnpanValueChangedCh24 ( double dValue ) { UpdatePanValue ( 24, dValue ); } - void OnpanValueChangedCh25 ( double dValue ) { UpdatePanValue ( 25, dValue ); } - void OnpanValueChangedCh26 ( double dValue ) { UpdatePanValue ( 26, dValue ); } - void OnpanValueChangedCh27 ( double dValue ) { UpdatePanValue ( 27, dValue ); } - void OnpanValueChangedCh28 ( double dValue ) { UpdatePanValue ( 28, dValue ); } - void OnpanValueChangedCh29 ( double dValue ) { UpdatePanValue ( 29, dValue ); } - void OnpanValueChangedCh30 ( double dValue ) { UpdatePanValue ( 30, dValue ); } - void OnpanValueChangedCh31 ( double dValue ) { UpdatePanValue ( 31, dValue ); } - void OnpanValueChangedCh32 ( double dValue ) { UpdatePanValue ( 32, dValue ); } - void OnpanValueChangedCh33 ( double dValue ) { UpdatePanValue ( 33, dValue ); } - void OnpanValueChangedCh34 ( double dValue ) { UpdatePanValue ( 34, dValue ); } - void OnpanValueChangedCh35 ( double dValue ) { UpdatePanValue ( 35, dValue ); } - void OnpanValueChangedCh36 ( double dValue ) { UpdatePanValue ( 36, dValue ); } - void OnpanValueChangedCh37 ( double dValue ) { UpdatePanValue ( 37, dValue ); } - void OnpanValueChangedCh38 ( double dValue ) { UpdatePanValue ( 38, dValue ); } - void OnpanValueChangedCh39 ( double dValue ) { UpdatePanValue ( 39, dValue ); } - void OnpanValueChangedCh40 ( double dValue ) { UpdatePanValue ( 40, dValue ); } - void OnpanValueChangedCh41 ( double dValue ) { UpdatePanValue ( 41, dValue ); } - void OnpanValueChangedCh42 ( double dValue ) { UpdatePanValue ( 42, dValue ); } - void OnpanValueChangedCh43 ( double dValue ) { UpdatePanValue ( 43, dValue ); } - void OnpanValueChangedCh44 ( double dValue ) { UpdatePanValue ( 44, dValue ); } - void OnpanValueChangedCh45 ( double dValue ) { UpdatePanValue ( 45, dValue ); } - void OnpanValueChangedCh46 ( double dValue ) { UpdatePanValue ( 46, dValue ); } - void OnpanValueChangedCh47 ( double dValue ) { UpdatePanValue ( 47, dValue ); } - void OnpanValueChangedCh48 ( double dValue ) { UpdatePanValue ( 48, dValue ); } - void OnpanValueChangedCh49 ( double dValue ) { UpdatePanValue ( 49, dValue ); } - - void OnChSoloStateChanged() { UpdateSoloStates(); } - -#endif - signals: void ChangeChanGain ( int iId, double dGain ); void ChangeChanPan ( int iId, double dPan ); diff --git a/src/channel.cpp b/src/channel.cpp index 19142925..38f05cec 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -28,7 +28,7 @@ // CChannel implementation ***************************************************** CChannel::CChannel ( const bool bNIsServer ) : vecdGains ( MAX_NUM_CHANNELS, 1.0 ), - vecdPannings ( MAX_NUM_CHANNELS, 0.5), + vecdPannings ( MAX_NUM_CHANNELS, 0.5), bDoAutoSockBufSize ( true ), iFadeInCnt ( 0 ), iFadeInCntMax ( FADE_IN_NUM_FRAMES_DBLE_FRAMESIZE ), diff --git a/src/protocol.h b/src/protocol.h index 542cf700..f2b218f4 100755 --- a/src/protocol.h +++ b/src/protocol.h @@ -98,7 +98,7 @@ public: void CreateReqJitBufMes(); void CreateChanGainMes ( const int iChanID, const double dGain ); void CreateChanPanMes ( const int iChanID, const double dPan ); - void CreateConClientListMes ( const CVector& vecChanInfo ); + void CreateConClientListMes ( const CVector& vecChanInfo ); void CreateReqConnClientsList(); void CreateChanInfoMes ( const CChannelCoreInfo ChanInfo ); void CreateReqChanInfoMes();