diff --git a/build_scripts/compile_version_string.txt b/build_scripts/compile_version_string.txt index fee2d3e..9e79a08 100644 --- a/build_scripts/compile_version_string.txt +++ b/build_scripts/compile_version_string.txt @@ -1 +1 @@ -3.1.0-dev \ No newline at end of file +3.2.0-RC1 \ No newline at end of file diff --git a/src/tabcontrollers/AudioTabController.cpp b/src/tabcontrollers/AudioTabController.cpp index 529b0cc..1060e8d 100644 --- a/src/tabcontrollers/AudioTabController.cpp +++ b/src/tabcontrollers/AudioTabController.cpp @@ -51,8 +51,6 @@ void AudioTabController::initStage1() reloadPttProfiles(); reloadPttConfig(); reloadAudioProfiles(); - // TODO Verify new defaults working as intended befoere removing - // applyDefaultProfile(); reloadAudioSettings(); eventLoopTick(); @@ -314,6 +312,7 @@ void AudioTabController::setMicVolume( float value, bool notify ) void AudioTabController::setMicMuted( bool value, bool notify ) { std::lock_guard lock( eventLoopMutex ); + if ( value != m_micMuted ) { m_micMuted = value; @@ -581,6 +580,7 @@ void AudioTabController::setMirrorDeviceIndex( int index, bool notify ) void AudioTabController::setMicDeviceIndex( int index, bool notify ) { + std::lock_guard lock( eventLoopMutex ); if ( index != m_recordingDeviceIndex ) { if ( index >= 0 @@ -588,13 +588,23 @@ void AudioTabController::setMicDeviceIndex( int index, bool notify ) { // un-mute mic before switching to ensure on exit all recording // devices will be un-muted - setMicMuted( false, false ); + bool tempProx = false; + if ( micProximitySensorCanMute() ) + { + setMicProximitySensorCanMute( false ); + tempProx = true; + } + setMicMuted( false, true ); // code to just change Mic audioManager->setMicDevice( m_recordingDevices[static_cast( index )].first, notify ); + if ( tempProx ) + { + setMicProximitySensorCanMute( true ); + } } - else if ( notify ) + if ( notify ) { emit micDeviceIndexChanged( m_recordingDeviceIndex ); } @@ -1191,9 +1201,18 @@ int AudioTabController::getDefaultAudioProfileIndex() void AudioTabController::shutdown() { - setMicMuted( false, false ); + setMicMuted( false, true ); std::string mID; bool hasDefaultProfile = false; + + // Un-mutes mic to prevent confusion on exit. + + setMicMuted( false ); + + // handles Setting Mirror back to User based settings + // since we have to change the Mirror Device via valve api. + // possibly could change windows tab controller to allow us to do + // natively. for ( unsigned i = 0; i < audioProfiles.size(); i++ ) { auto& profile = audioProfiles[i];