From 667ec3eb381aa36c45de9a3be8bcb27b9406fcc2 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 24 Jan 2011 21:21:09 +0000 Subject: [PATCH] bug fix with solo switch, changed size of settings window --- ChangeLog | 7 +++++++ src/audiomixerboard.cpp | 23 +++++++++++++++++++---- src/clientsettingsdlgbase.ui | 2 +- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 70ff269b..f858b9c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +3.1.2 + +- show warning in main window if audio delay is too long + +- bug fix: solo switch did not work correctly + + 3.1.1 - added stereo audio channel support diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 4fe991d6..7afb4e12 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -174,8 +174,9 @@ void CChannelFader::Reset() void CChannelFader::OnGainValueChanged ( int value ) { - // if mute flag is set, do not apply the new fader value - if ( pcbMute->checkState() == Qt::Unchecked ) + // if mute flag is set or other channel is on solo, do not apply the new + // fader value + if ( ( pcbMute->checkState() == Qt::Unchecked ) && !bOtherChannelIsSolo ) { // emit signal for new fader gain value emit gainValueChanged ( CalcFaderGain ( value ) ); @@ -209,8 +210,11 @@ void CChannelFader::SetMute ( const bool bState ) void CChannelFader::ResetSoloState() { // reset solo state -> since solo state means that this channel is not - // muted but all others, we simply have to uncheck the check box + // muted but all others, we simply have to uncheck the check box (make + // sure the setChecked does not fire a signal) + pcbSolo->blockSignals ( true ); pcbSolo->setChecked ( false ); + pcbSolo->blockSignals ( false ); } void CChannelFader::SetOtherSoloState ( const bool bState ) @@ -222,7 +226,11 @@ void CChannelFader::SetOtherSoloState ( const bool bState ) // our solo state since only one channel can be set to solo if ( bState && pcbSolo->isChecked() ) { + // we do not want to fire a signal with the following set function + // -> block signals temporarily + pcbSolo->blockSignals ( true ); pcbSolo->setChecked ( false ); + pcbSolo->blockSignals ( false ); } // if other channel is solo, mute this channel, else enable channel gain @@ -411,7 +419,8 @@ void CAudioMixerBoard::ApplyNewConClientList ( CVector& vecCh emit NumClientsChanged ( iNumConnectedClients ); } -void CAudioMixerBoard::OnChSoloStateChanged ( const int iChannelIdx, const int iValue ) +void CAudioMixerBoard::OnChSoloStateChanged ( const int iChannelIdx, + const int iValue ) { // if channel iChannelIdx has just activated the solo switch, mute all // other channels, else enable them again @@ -430,6 +439,12 @@ void CAudioMixerBoard::OnChSoloStateChanged ( const int iChannelIdx, const int i } } } + + // set "other solo state" always to false for the current fader at which the + // status was changed because if solo is enabled, it has to be "false" and + // in case solo is just disabled (check was removed by the user), also no + // other channel can be solo at this time + vecpChanFader[iChannelIdx]->SetOtherSoloState ( false ); } QString CAudioMixerBoard::GenFaderText ( CChannelShortInfo& ChanInfo ) diff --git a/src/clientsettingsdlgbase.ui b/src/clientsettingsdlgbase.ui index dc31d9dc..c5f610e9 100755 --- a/src/clientsettingsdlgbase.ui +++ b/src/clientsettingsdlgbase.ui @@ -6,7 +6,7 @@ 0 0 535 - 374 + 351