|
1757 | 1757 | // Always unmute vp if restart mute mode. |
1758 | 1758 | if (state.next.mute_mode == MuteMode::RestartEngine && |
1759 | 1759 | inputNode().voiceProcessingInputMuted) { |
1760 | | - LOGI() << "setVoiceProcessingInputMuted: un-muting vp for restart mute mode"; |
| 1760 | + LOGI() << "Update mute (voice processing) unmuting vp for restart engine mode"; |
1761 | 1761 | inputNode().voiceProcessingInputMuted = false; |
1762 | 1762 | } |
1763 | 1763 |
|
|
2028 | 2028 |
|
2029 | 2029 | // If disabling input, always unmute the voice-processing input mute. |
2030 | 2030 | if (inputNode().voiceProcessingEnabled && inputNode().voiceProcessingInputMuted) { |
2031 | | - LOGI() << "setVoiceProcessingInputMuted (stop-recording): " << 0; |
| 2031 | + LOGI() << "Update mute (voice processing) unmuting vp for stop-recording"; |
2032 | 2032 | inputNode().voiceProcessingInputMuted = false; |
2033 | 2033 | } |
2034 | 2034 |
|
|
2084 | 2084 | if (state.next.mute_mode == MuteMode::VoiceProcessing && state.next.IsInputEnabled() && |
2085 | 2085 | inputNode().voiceProcessingEnabled && |
2086 | 2086 | inputNode().voiceProcessingInputMuted != state.next.input_muted) { |
2087 | | - LOGI() << "setVoiceProcessingInputMuted (runtime): " << state.next.input_muted; |
| 2087 | + LOGI() << "Update mute (voice processing) runtime update" << state.next.input_muted; |
2088 | 2088 | inputNode().voiceProcessingInputMuted = state.next.input_muted; |
2089 | 2089 | } |
2090 | 2090 |
|
| 2091 | + // Run-time mute toggling if mixer mute mode. |
| 2092 | + if (state.next.mute_mode == MuteMode::InputMixer && state.next.IsInputEnabled() && |
| 2093 | + input_mixer_node_ != nil) { |
| 2094 | + // Only update if the volume has changed. |
| 2095 | + float mixer_volume = state.next.input_muted ? 0.0f : 1.0f; |
| 2096 | + if (input_mixer_node_.outputVolume != mixer_volume) { |
| 2097 | + LOGI() << "Update mute (input mixer) runtime update" << state.next.input_muted; |
| 2098 | + input_mixer_node_.outputVolume = mixer_volume; |
| 2099 | + } |
| 2100 | + } |
| 2101 | + |
2091 | 2102 | #if !TARGET_OS_TV |
2092 | 2103 | if (state.next.IsInputEnabled() && inputNode().voiceProcessingEnabled && |
2093 | 2104 | (!state.prev.IsInputEnabled() || |
|
0 commit comments