当前位置: 首页>>代码示例>>Python>>正文


Python AvcGeneral.get_unit_info方法代码示例

本文整理汇总了Python中ta1394.general.AvcGeneral.get_unit_info方法的典型用法代码示例。如果您正苦于以下问题:Python AvcGeneral.get_unit_info方法的具体用法?Python AvcGeneral.get_unit_info怎么用?Python AvcGeneral.get_unit_info使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ta1394.general.AvcGeneral的用法示例。


在下文中一共展示了AvcGeneral.get_unit_info方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from ta1394.general import AvcGeneral [as 别名]
# 或者: from ta1394.general.AvcGeneral import get_unit_info [as 别名]
 def __init__(self, path):
     super().__init__(path)
     for quad in self.get_config_rom():
         # Vendor ID
         if quad >> 24 == 0x03:
             vendor_id = quad & 0x00FFFFFF
             continue
         # Model ID
         if quad >> 24 == 0x17:
             model_id = quad & 0x00FFFFFF
             break
     else:
         raise ValueError("Invalid argument for Yamaha/Terratec unit")
     # Check vendor ID for Yamaha/Terratec OUI
     if vendor_id != 0x00A0DE and vendor_id != 0x000AAC:
         raise ValueError("Invalid argument for Yamaha/Terratec unit")
     # Yamaha GO 44 or Terratec Phase 24 FW
     if model_id == 0x10000B or model_id == 0x000005:
         self.name = "GO44"
         self._output_sink_labels = ("analog-1/2", "headphone-1/2", "digital-1/2")
         self._mixer_output_fb = 1
         self._input_level_labels = {"low": 0xF400, "middle": 0xFD00, "high": 0x0000}
         self._output_labels = ()
     # Yamaha GO 46 or Terratec Phase X24 FW
     elif model_id == 0x10000C or model_id == 0x000007:
         self.name = "GO46"
         self._output_sink_labels = ("analog-1/2", "analog-3/4", "digital-1/2")
         self._mixer_output_fb = 2
         self._output_fb = 1
         self._input_level_labels = {}
         self._output_labels = ("analog-1/2", "analog-3/4")
     else:
         raise ValueError("Invalid argument for Yamaha/Terratec unit")
     unit_info = AvcGeneral.get_unit_info(self.fcp)
     self._company_ids = unit_info["company-id"]
开发者ID:takaswie,项目名称:hinawa-utils,代码行数:37,代码来源:yamaha_terratec.py

示例2: __init__

# 需要导入模块: from ta1394.general import AvcGeneral [as 别名]
# 或者: from ta1394.general.AvcGeneral import get_unit_info [as 别名]
 def __init__(self, path):
     super().__init__(path)
     model_id = -1
     for quad in self.get_config_rom():
         if quad >> 24 == 0x17:
             model_id = quad & 0x00ffffff
             self._id = self._ids[model_id][0]
             info = AvcGeneral.get_unit_info(self.fcp)
             self._company_ids = info['company-id']
     if model_id < 0:
         raise OSError('Not supported')
开发者ID:takaswie,项目名称:hinawa-utils,代码行数:13,代码来源:maudio_normal.py

示例3: __init__

# 需要导入模块: from ta1394.general import AvcGeneral [as 别名]
# 或者: from ta1394.general.AvcGeneral import get_unit_info [as 别名]
 def __init__(self, path):
     super().__init__(path)
     model_id = -1
     for quad in self.get_config_rom():
         if quad >> 24 == 0x17:
             model_id = quad & 0x00FFFFFF
             self._id = self._ids[model_id][0]
             info = AvcGeneral.get_unit_info(self.fcp)
             self._company_ids = info["company-id"]
     if model_id < 0:
         raise OSError("Not supported")
     # For process local cache.
     self._cache = [0x00000000] * 40
     # For permanent cache.
     self._filepath = "/tmp/hinawa-{0:08x}".format(self.get_property("guid"))
     self._load_cache()
开发者ID:takaswie,项目名称:hinawa-utils,代码行数:18,代码来源:maudio_special.py

示例4: _parse_unit_info

# 需要导入模块: from ta1394.general import AvcGeneral [as 别名]
# 或者: from ta1394.general.AvcGeneral import get_unit_info [as 别名]
 def _parse_unit_info(self):
     return AvcGeneral.get_unit_info(self.fcp) 
开发者ID:takaswie,项目名称:hinawa-utils,代码行数:4,代码来源:plug_parser.py

示例5: __init__

# 需要导入模块: from ta1394.general import AvcGeneral [as 别名]
# 或者: from ta1394.general.AvcGeneral import get_unit_info [as 别名]
 def __init__(self, path):
     super().__init__(path)
     unit_info = AvcGeneral.get_unit_info(self.fcp)
     self.company_ids = unit_info['company-id']
开发者ID:takaswie,项目名称:hinawa-utils,代码行数:6,代码来源:tascam_fireone.py


注:本文中的ta1394.general.AvcGeneral.get_unit_info方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。