From 00bd9167b476dc4a1de591908d060e4b5efa3d89 Mon Sep 17 00:00:00 2001 From: ann0see <20726856+ann0see@users.noreply.github.com> Date: Sun, 31 Jul 2022 15:31:45 +0200 Subject: [PATCH] Refactoring: Improve/Remove comments --- src/audiomixerboard.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 06c514b2aa..c925a21075 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -1225,12 +1225,12 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecChanInf iFaderNumber[vecChanInfo[iFader].iChanID] = iFader; } + // Hide all unused faders and initialize used ones for ( int iChanID = 0; iChanID < MAX_NUM_CHANNELS; iChanID++ ) { if ( iFaderNumber[iChanID] == INVALID_INDEX ) { - // fader is not used --> hide it - // before hiding the fader, store its level (if some conditions are fulfilled) + // current fader is not used StoreFaderSettings ( vecpChanFader[iChanID] ); vecpChanFader[iChanID]->Hide(); @@ -1238,22 +1238,22 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecChanInf } // current fader is used - // check if fader was already in use -> preserve gain value if ( !vecpChanFader[iChanID]->IsVisible() ) { - // the fader was not in use, reset everything for new client + // the fader was not in use, + // reset everything for new client vecpChanFader[iChanID]->Reset(); vecAvgLevels[iChanID] = 0.0f; - // check if this is my own fader and set fader property if ( iChanID == iMyChannelID ) { + // this is my own fader --> set fader property vecpChanFader[iChanID]->SetIsMyOwnFader(); } - // set and increment the running new client counter needed for sorting (per definition: - // a fader for a new client shall always be inserted at the right-hand-side if no other - // sorting type is selected (i.e. "no sorting" is active) (#673) + // keep track of each new client + // for "no sorting" channel sort order new clients are added + // to the right-hand side of the mixer (#673) vecpChanFader[iChanID]->SetRunningNewClientCnt ( iRunningNewClientCnt++ ); // show fader @@ -1274,7 +1274,6 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecChanInf } } - // restore gain (if new name is different from the current one) if ( vecpChanFader[iChanID]->GetReceivedName().compare ( vecChanInfo[iFaderNumber[iChanID]].strName ) ) { // the text has actually changed, search in the list of