本文整理汇总了Python中mod.session.SESSION.peakmeter方法的典型用法代码示例。如果您正苦于以下问题:Python SESSION.peakmeter方法的具体用法?Python SESSION.peakmeter怎么用?Python SESSION.peakmeter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mod.session.SESSION
的用法示例。
在下文中一共展示了SESSION.peakmeter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _process_msg
# 需要导入模块: from mod.session import SESSION [as 别名]
# 或者: from mod.session.SESSION import peakmeter [as 别名]
def _process_msg(self, msg):
from mod.session import SESSION
try:
cmd, instance, port, value = msg.replace("\x00", "").split()
assert cmd == "monitor"
instance = int(instance)
value = float(value)
except (ValueError, AssertionError) as e:
# TODO: tratar error
pass
else:
if instance == CLIPMETER_IN:
if port == CLIPMETER_MON_L:
SESSION.clipmeter(0, value)
elif port == CLIPMETER_MON_R:
SESSION.clipmeter(1, value)
elif instance == CLIPMETER_OUT:
if port == CLIPMETER_MON_L:
SESSION.clipmeter(2, value)
elif port == CLIPMETER_MON_R:
SESSION.clipmeter(3, value)
elif instance == PEAKMETER_IN:
if port == PEAKMETER_MON_VALUE_L:
self.pkm_inl_value = value
SESSION.peakmeter(0, self.pkm_inl_value, self.pkm_inl_peak)
elif port == PEAKMETER_MON_VALUE_R:
self.pkm_inr_value = value
SESSION.peakmeter(1, self.pkm_inr_value, self.pkm_inr_peak)
if port == PEAKMETER_MON_PEAK_L:
self.pkm_inl_peak = value
SESSION.peakmeter(0, self.pkm_inl_value, self.pkm_inl_peak)
elif port == PEAKMETER_MON_PEAK_R:
self.pkm_inr_peak = value
SESSION.peakmeter(1, self.pkm_inr_value, self.pkm_inr_peak)
elif instance == PEAKMETER_OUT:
if port == PEAKMETER_MON_VALUE_L:
self.pkm_outl_value = value
SESSION.peakmeter(2, self.pkm_outl_value, self.pkm_outl_peak)
elif port == PEAKMETER_MON_VALUE_R:
self.pkm_outr_value = value
SESSION.peakmeter(3, self.pkm_outr_value, self.pkm_outr_peak)
if port == PEAKMETER_MON_PEAK_L:
self.pkm_outl_peak = value
SESSION.peakmeter(2, self.pkm_outl_value, self.pkm_outl_peak)
elif port == PEAKMETER_MON_PEAK_R:
self.pkm_outr_peak = value
SESSION.peakmeter(3, self.pkm_outr_value, self.pkm_outr_peak)
elif instance == TUNER:
SESSION.tuner(value)
self._handle_conn()
示例2:
# 需要导入模块: from mod.session import SESSION [as 别名]
# 或者: from mod.session.SESSION import peakmeter [as 别名]
if instance == CLIPMETER_IN:
if port == CLIPMETER_MON_L:
SESSION.clipmeter(0, value)
elif port == CLIPMETER_MON_R:
SESSION.clipmeter(1, value)
elif instance == CLIPMETER_OUT:
if port == CLIPMETER_MON_L:
SESSION.clipmeter(2, value)
elif port == CLIPMETER_MON_R:
SESSION.clipmeter(3, value)
elif instance == PEAKMETER_IN:
if port == PEAKMETER_MON_VALUE_L:
self.pkm_inl_value = value
SESSION.peakmeter(0, self.pkm_inl_value, self.pkm_inl_peak)
elif port == PEAKMETER_MON_VALUE_R:
self.pkm_inr_value = value
SESSION.peakmeter(1, self.pkm_inr_value, self.pkm_inr_peak)
if port == PEAKMETER_MON_PEAK_L:
self.pkm_inl_peak = value
SESSION.peakmeter(0, self.pkm_inl_value, self.pkm_inl_peak)
elif port == PEAKMETER_MON_PEAK_R:
self.pkm_inr_peak = value
SESSION.peakmeter(1, self.pkm_inr_value, self.pkm_inr_peak)
elif instance == PEAKMETER_OUT:
if port == PEAKMETER_MON_VALUE_L:
self.pkm_outl_value = value
SESSION.peakmeter(2, self.pkm_outl_value, self.pkm_outl_peak)