From 91642b0c2ed9edc25156099a5f53db006cc84c67 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 12 Jan 2019 12:59:16 +0000 Subject: [PATCH] use integer for the fader level message --- ChangeLog | 5 +++++ src/audiomixerboard.cpp | 6 +++--- src/audiomixerboard.h | 4 ++-- src/client.cpp | 4 ++-- src/client.h | 2 +- src/clientdlg.cpp | 4 ++-- src/clientdlg.h | 6 +++--- src/soundbase.cpp | 6 +++--- src/soundbase.h | 6 +++--- 9 files changed, 24 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 363ae547..5d69d4ca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,11 @@ +3.4.4 + +- added support for controlling the audio mixer faders with a MIDI controller (MacOS only) + + 3.4.3 (2018-05-17) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index a18f45e9..ff6be827 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -669,15 +669,15 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecChanInf emit NumClientsChanged ( iNumConnectedClients ); } -void CAudioMixerBoard::SetFaderLevel ( const int iChannelIdx, - const double dValue ) +void CAudioMixerBoard::SetFaderLevel ( const int iChannelIdx, + const int iValue ) { // only apply new fader level if channel index is valid and the fader is visible if ( ( iChannelIdx >= 0 ) && ( iChannelIdx < MAX_NUM_CHANNELS ) ) { if ( vecpChanFader[iChannelIdx]->IsVisible() ) { - vecpChanFader[iChannelIdx]->SetFaderLevel ( dValue ); + vecpChanFader[iChannelIdx]->SetFaderLevel ( iValue ); } } } diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index dbad3da2..51fec28b 100755 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -102,8 +102,8 @@ public: void SetServerName ( const QString& strNewServerName ); void SetGUIDesign ( const EGUIDesign eNewDesign ); - void SetFaderLevel ( const int iChannelIdx, - const double dValue ); + void SetFaderLevel ( const int iChannelIdx, + const int iValue ); // settings CVector vecStoredFaderTags; diff --git a/src/client.cpp b/src/client.cpp index 50b76a91..a82ef116 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -198,8 +198,8 @@ CClient::CClient ( const quint16 iPortNumber, this, SLOT ( OnSndCrdReinitRequest ( int ) ) ); QObject::connect ( &Sound, - SIGNAL ( ControllerInFaderLevel ( int, double ) ), - SIGNAL ( ControllerInFaderLevel ( int, double ) ) ); + SIGNAL ( ControllerInFaderLevel ( int, int ) ), + SIGNAL ( ControllerInFaderLevel ( int, int ) ) ); QObject::connect ( &Socket, SIGNAL ( InvalidPacketReceived ( CHostAddress ) ), this, SLOT ( OnInvalidPacketReceived ( CHostAddress ) ) ); diff --git a/src/client.h b/src/client.h index 51883bd9..cbe95ef2 100755 --- a/src/client.h +++ b/src/client.h @@ -411,7 +411,7 @@ signals: #endif void Disconnected(); - void ControllerInFaderLevel ( int iChannelIdx, double dValue ); + void ControllerInFaderLevel ( int iChannelIdx, int iValue ); }; #endif /* !defined ( CLIENT_HOIHGE76GEKJH98_3_43445KJIUHF1912__INCLUDED_ ) */ diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 1a1cfadc..8a519ed5 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -483,8 +483,8 @@ CClientDlg::CClientDlg ( CClient* pNCliP, this, SLOT ( OnCLPingTimeWithNumClientsReceived ( CHostAddress, int, int ) ) ); QObject::connect ( pClient, - SIGNAL ( ControllerInFaderLevel ( int, double ) ), - this, SLOT ( OnControllerInFaderLevel ( int, double ) ) ); + SIGNAL ( ControllerInFaderLevel ( int, int ) ), + this, SLOT ( OnControllerInFaderLevel ( int, int ) ) ); #ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING QObject::connect ( pClient, diff --git a/src/clientdlg.h b/src/clientdlg.h index 242bb4ec..d53fd003 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -134,9 +134,9 @@ public slots: int iPingTime, int iNumClients ); - void OnControllerInFaderLevel ( const int iChannelIdx, - const double dValue ) { MainMixerBoard->SetFaderLevel ( iChannelIdx, - dValue ); } + void OnControllerInFaderLevel ( const int iChannelIdx, + const int iValue ) { MainMixerBoard->SetFaderLevel ( iChannelIdx, + iValue ); } #ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING void OnCLVersionAndOSReceived ( CHostAddress InetAddr, diff --git a/src/soundbase.cpp b/src/soundbase.cpp index 5ca31cdf..b9c24e8c 100755 --- a/src/soundbase.cpp +++ b/src/soundbase.cpp @@ -100,9 +100,9 @@ void CSoundBase::run() void CSoundBase::ParseMIDIMessage ( const CVector& vMIDIPaketBytes ) { // TODO -int iChannelIdx = 0; -double dFaderLevel = 0; -EmitControllerInFaderLevel ( iChannelIdx, dFaderLevel ); +int iChannelIdx = 0; +int iFaderLevel = 0; +EmitControllerInFaderLevel ( iChannelIdx, iFaderLevel ); } diff --git a/src/soundbase.h b/src/soundbase.h index 420d1898..b51a091b 100755 --- a/src/soundbase.h +++ b/src/soundbase.h @@ -89,8 +89,8 @@ public: void EmitReinitRequestSignal ( const ESndCrdResetType eSndCrdResetType ) { emit ReinitRequest ( eSndCrdResetType ); } - void EmitControllerInFaderLevel ( const int iChannelIdx, - const double dValue ) { emit ControllerInFaderLevel ( iChannelIdx, dValue ); } + void EmitControllerInFaderLevel ( const int iChannelIdx, + const int iValue ) { emit ControllerInFaderLevel ( iChannelIdx, iValue ); } protected: // driver handling @@ -129,7 +129,7 @@ protected: signals: void ReinitRequest ( int iSndCrdResetType ); - void ControllerInFaderLevel ( int iChannelIdx, double dValue ); + void ControllerInFaderLevel ( int iChannelIdx, int iValue ); }; #endif /* !defined ( SOUNDBASE_HOIHGEH8_3_4344456456345634565KJIUHF1912__INCLUDED_ ) */