@@ -4520,6 +4520,12 @@ def script_cycleSoundSplit(self, gesture: "inputCore.InputGesture") -> None:
45204520 gesture = "kb:NVDA+alt+pageUp" ,
45214521 )
45224522 def script_increaseApplicationsVolume (self , gesture : "inputCore.InputGesture" ) -> None :
4523+ state = audio .soundSplit .SoundSplitState (config .conf ["audio" ]["soundSplitState" ])
4524+ if state == audio .soundSplit .SoundSplitState .OFF :
4525+ # Translators: An error message while trying to adjust applications volume
4526+ msg = _ ("Please enable sound split to use this command" )
4527+ ui .message (msg )
4528+ return
45234529 volume = config .conf ["audio" ]["applicationsSoundVolume" ]
45244530 volume = min (100 , volume + 5 )
45254531 config .conf ["audio" ]["applicationsSoundVolume" ] = volume
@@ -4538,6 +4544,12 @@ def script_increaseApplicationsVolume(self, gesture: "inputCore.InputGesture") -
45384544 gesture = "kb:NVDA+alt+pageDown" ,
45394545 )
45404546 def script_decreaseApplicationsVolume (self , gesture : "inputCore.InputGesture" ) -> None :
4547+ state = audio .soundSplit .SoundSplitState (config .conf ["audio" ]["soundSplitState" ])
4548+ if state == audio .soundSplit .SoundSplitState .OFF :
4549+ # Translators: An error message while trying to adjust applications volume
4550+ msg = _ ("Please enable sound split to use this command" )
4551+ ui .message (msg )
4552+ return
45414553 volume = config .conf ["audio" ]["applicationsSoundVolume" ]
45424554 volume = max (0 , volume - 5 )
45434555 config .conf ["audio" ]["applicationsSoundVolume" ] = volume
@@ -4556,6 +4568,12 @@ def script_decreaseApplicationsVolume(self, gesture: "inputCore.InputGesture") -
45564568 gesture = "kb:NVDA+alt+delete" ,
45574569 )
45584570 def script_toggleApplicationsMute (self , gesture : "inputCore.InputGesture" ) -> None :
4571+ state = audio .soundSplit .SoundSplitState (config .conf ["audio" ]["soundSplitState" ])
4572+ if state == audio .soundSplit .SoundSplitState .OFF :
4573+ # Translators: An error message while trying to adjust applications volume
4574+ msg = _ ("Please enable sound split to use this command" )
4575+ ui .message (msg )
4576+ return
45594577 muted = config .conf ["audio" ]["applicationsMuted" ]
45604578 muted = not muted
45614579 config .conf ["audio" ]["applicationsMuted" ] = muted
0 commit comments