| @@ -131,7 +131,11 @@ def setEngineParameter(parameter, value, optional=True): | |||||
| if not engineHasFeature(parameter): | if not engineHasFeature(parameter): | ||||
| return False | return False | ||||
| elif optional: | elif optional: | ||||
| if value != gJackctl.GetParameterValue(["engine", parameter])[2]: | |||||
| paramValueTry = gJackctl.GetParameterValue(["engine", parameter]) | |||||
| if paramValueTry is None: | |||||
| return False | |||||
| paramValue = paramValueTry[2] | |||||
| if value != paramValue: | |||||
| return bool(gJackctl.SetParameterValue(["engine", parameter], value)) | return bool(gJackctl.SetParameterValue(["engine", parameter], value)) | ||||
| else: | else: | ||||
| return False | return False | ||||
| @@ -362,11 +366,22 @@ class JackSettingsW(QDialog): | |||||
| for i in range(len(settings[1])): | for i in range(len(settings[1])): | ||||
| attribute = str(settings[1][i]) | attribute = str(settings[1][i]) | ||||
| if reset: | if reset: | ||||
| value = gJackctl.GetParameterValue(["engine", attribute])[1] | |||||
| valueTry = gJackctl.GetParameterValue(["engine", attribute]) | |||||
| if valueTry is None: | |||||
| continue | |||||
| else: | |||||
| value = valueTry[1] | |||||
| if forceReset and attribute != "driver": | if forceReset and attribute != "driver": | ||||
| gJackctl.ResetParameterValue(["engine", attribute]) | gJackctl.ResetParameterValue(["engine", attribute]) | ||||
| else: | else: | ||||
| value = gJackctl.GetParameterValue(["engine", attribute])[2] | |||||
| valueTry = gJackctl.GetParameterValue(["engine", attribute]) | |||||
| if valueTry is None: | |||||
| continue | |||||
| else: | |||||
| value = valueTry[2] | |||||
| if attribute == "name": | if attribute == "name": | ||||
| self.ui.obj_server_name.setText(str(value)) | self.ui.obj_server_name.setText(str(value)) | ||||