1class CrasInputNode(object): 2 """Class representing an input node from ChromeOS Audio Server data. 3 4 An input node is a node that can pick up audio, e.g. a microphone jack. 5 """ 6 7 def __init__(self, node_id, node_name, gain, node_type, device_id, 8 device_name): 9 self.node_id = node_id 10 self.node_name = node_name 11 self.gain = int(gain) 12 self.node_type = node_type 13 self.device_id = device_id 14 self.device_name = device_name 15 16 def __str__(self): 17 return ('Node id: %s, Node name: %s, Device id: %s, Device name: %s ' 18 'Gain: %d' % (self.node_id, self.node_name, self.device_id, 19 self.device_name, self.gain)) 20