Description to protocal; made pan connections similar to gain.

This commit is contained in:
Tarmo Johannes 2020-05-16 19:18:58 +03:00
parent 49245e6118
commit fa85d3d5a7
3 changed files with 135 additions and 4 deletions

View file

@ -598,10 +598,10 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
// Connections -------------------------------------------------------------
for (int i=0; i< static_cast<int>( vecpChanFader.size() ); i++) {
QObject::connect ( vecpChanFader[i], SIGNAL ( panValueChanged ( double ) ),
this, SLOT ( OnPanValueChanged ( double ) ) );
}
// for (int i=0; i< static_cast<int>( vecpChanFader.size() ); i++) {
// QObject::connect ( vecpChanFader[i], SIGNAL ( panValueChanged ( double ) ),
// this, SLOT ( OnPanValueChanged ( double ) ) );
// }
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
@ -661,6 +661,58 @@ CAudioMixerBoard::CAudioMixerBoard ( QWidget* parent, Qt::WindowFlags ) :
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() ) );
@ -724,12 +776,18 @@ inline void CAudioMixerBoard::connectFaderSignalsToMixerBoardSlots()
void ( CAudioMixerBoard::* pGainValueChanged )( double ) =
&CAudioMixerBoardSlots<slotId>::OnChGainValueChanged;
void ( CAudioMixerBoard::* pPanValueChanged )( double ) =
&CAudioMixerBoardSlots<slotId>::OnChPanValueChanged;
QObject::connect ( vecpChanFader[iCurChanID], &CChannelFader::soloStateChanged,
this, &CAudioMixerBoard::UpdateSoloStates );
QObject::connect ( vecpChanFader[iCurChanID], &CChannelFader::gainValueChanged,
this, pGainValueChanged );
QObject::connect ( vecpChanFader[iCurChanID], &CChannelFader::panValueChanged,
this, pPanValueChanged );
connectFaderSignalsToMixerBoardSlots<slotId - 1>();
};
@ -944,6 +1002,12 @@ void CAudioMixerBoard::UpdateGainValue ( const int iChannelIdx,
emit ChangeChanGain ( iChannelIdx, dValue );
}
void CAudioMixerBoard::UpdatePanValue ( const int iChannelIdx,
const double dValue )
{
emit ChangeChanPan ( iChannelIdx, dValue );
}
void CAudioMixerBoard::OnPanValueChanged ( const double dValue )
{

View file

@ -115,10 +115,13 @@ class CAudioMixerBoardSlots : public CAudioMixerBoardSlots<slotId - 1>
public:
void OnChGainValueChanged ( double dValue ) { UpdateGainValue ( slotId - 1, dValue ); }
void OnChPanValueChanged ( double dValue ) { UpdatePanValue ( slotId - 1, dValue ); }
protected:
virtual void UpdateGainValue ( const int iChannelIdx,
const double dValue ) = 0;
virtual void UpdatePanValue ( const int iChannelIdx,
const double dValue ) = 0;
};
template<>
@ -179,6 +182,8 @@ protected:
#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
virtual void UpdateGainValue ( const int iChannelIdx,
const double dValue );
virtual void UpdatePanValue ( const int iChannelIdx,
const double dValue );
template<unsigned int slotId>
inline void connectFaderSignalsToMixerBoardSlots();
@ -187,6 +192,10 @@ protected:
void UpdateGainValue ( const int iChannelIdx,
const double dValue );
void UpdatePanValue ( const int iChannelIdx,
const double dValue );
#endif
public slots:
@ -246,6 +255,57 @@ public slots:
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

View file

@ -64,6 +64,13 @@ MESSAGES (with connection)
+-------------------+--------------+
- PROTMESSID_CHANNEL_PAN: Gain of channel
+-------------------+-----------------+
| 1 byte channel ID | 2 bytes panning |
+-------------------+-----------------+
- PROTMESSID_CONN_CLIENTS_LIST: Information about connected clients
for each connected client append following data: