Add option to use high-quality voice for ptt
This commit is contained in:
parent
26899f8cd6
commit
210163de0a
|
@ -1811,7 +1811,11 @@ class SidebandApp(MDApp):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.sideband.ui_started_recording()
|
self.sideband.ui_started_recording()
|
||||||
self.audio_msg_mode = LXMF.AM_CODEC2_2400
|
if self.sideband.config["hq_ptt"]:
|
||||||
|
self.audio_msg_mode = LXMF.AM_OPUS_OGG
|
||||||
|
else:
|
||||||
|
self.audio_msg_mode = LXMF.AM_CODEC2_2400
|
||||||
|
|
||||||
self.message_attach_action(attach_type="audio", nodialog=True)
|
self.message_attach_action(attach_type="audio", nodialog=True)
|
||||||
if self.rec_dialog == None:
|
if self.rec_dialog == None:
|
||||||
self.message_init_rec_dialog()
|
self.message_init_rec_dialog()
|
||||||
|
@ -2755,6 +2759,10 @@ class SidebandApp(MDApp):
|
||||||
self.sideband.config["block_predictive_text"] = self.settings_screen.ids.settings_block_predictive_text.active
|
self.sideband.config["block_predictive_text"] = self.settings_screen.ids.settings_block_predictive_text.active
|
||||||
self.sideband.save_configuration()
|
self.sideband.save_configuration()
|
||||||
|
|
||||||
|
def save_hq_ptt(sender=None, event=None):
|
||||||
|
self.sideband.config["hq_ptt"] = self.settings_screen.ids.settings_hq_ptt.active
|
||||||
|
self.sideband.save_configuration()
|
||||||
|
|
||||||
def save_print_command(sender=None, event=None):
|
def save_print_command(sender=None, event=None):
|
||||||
if not sender.focus:
|
if not sender.focus:
|
||||||
in_cmd = self.settings_screen.ids.settings_print_command.text
|
in_cmd = self.settings_screen.ids.settings_print_command.text
|
||||||
|
@ -2918,6 +2926,9 @@ class SidebandApp(MDApp):
|
||||||
self.settings_screen.ids.settings_lxm_limit_1mb.active = self.sideband.config["lxm_limit_1mb"]
|
self.settings_screen.ids.settings_lxm_limit_1mb.active = self.sideband.config["lxm_limit_1mb"]
|
||||||
self.settings_screen.ids.settings_lxm_limit_1mb.bind(active=save_lxm_limit_1mb)
|
self.settings_screen.ids.settings_lxm_limit_1mb.bind(active=save_lxm_limit_1mb)
|
||||||
|
|
||||||
|
self.settings_screen.ids.settings_hq_ptt.active = self.sideband.config["hq_ptt"]
|
||||||
|
self.settings_screen.ids.settings_hq_ptt.bind(active=save_hq_ptt)
|
||||||
|
|
||||||
self.settings_screen.ids.settings_debug.active = self.sideband.config["debug"]
|
self.settings_screen.ids.settings_debug.active = self.sideband.config["debug"]
|
||||||
self.settings_screen.ids.settings_debug.bind(active=save_debug)
|
self.settings_screen.ids.settings_debug.bind(active=save_debug)
|
||||||
|
|
||||||
|
|
|
@ -526,6 +526,8 @@ class SidebandCore():
|
||||||
self.config["display_style_in_contact_list"] = False
|
self.config["display_style_in_contact_list"] = False
|
||||||
if not "lxm_limit_1mb" in self.config:
|
if not "lxm_limit_1mb" in self.config:
|
||||||
self.config["lxm_limit_1mb"] = True
|
self.config["lxm_limit_1mb"] = True
|
||||||
|
if not "hq_ptt" in self.config:
|
||||||
|
self.config["hq_ptt"] = False
|
||||||
|
|
||||||
if not "input_language" in self.config:
|
if not "input_language" in self.config:
|
||||||
self.config["input_language"] = None
|
self.config["input_language"] = None
|
||||||
|
|
|
@ -1678,6 +1678,22 @@ MDScreen:
|
||||||
disabled: False
|
disabled: False
|
||||||
active: False
|
active: False
|
||||||
|
|
||||||
|
MDBoxLayout:
|
||||||
|
orientation: "horizontal"
|
||||||
|
size_hint_y: None
|
||||||
|
padding: [0,0,dp(24),dp(0)]
|
||||||
|
height: dp(48)
|
||||||
|
|
||||||
|
MDLabel:
|
||||||
|
text: "Use high-quality voice for PTT"
|
||||||
|
font_style: "H6"
|
||||||
|
|
||||||
|
MDSwitch:
|
||||||
|
id: settings_hq_ptt
|
||||||
|
pos_hint: {"center_y": 0.3}
|
||||||
|
disabled: False
|
||||||
|
active: False
|
||||||
|
|
||||||
MDBoxLayout:
|
MDBoxLayout:
|
||||||
orientation: "horizontal"
|
orientation: "horizontal"
|
||||||
size_hint_y: None
|
size_hint_y: None
|
||||||
|
|
Loading…
Reference in New Issue