Lines Matching refs:dir
20 def opsIsChannel(self, dir, chn): argument
23 def opsGetRange(self, dir): argument
24 return (0, self.min[dir], self.max[dir])
26 def opsSetRange(self, dir, min, max): argument
27 self.min[dir] = min
28 self.max[dir] = max
30 def volumeToUser(self, info, dir, value): argument
34 return self.min[dir]
35 n = (value - min) * (self.max[dir] - self.min[dir])
36 return self.min[dir] + (n + (max - min) / 2) / (max - min)
38 def volumeFromUser(self, info, dir, value): argument
41 if self.max[dir] == self.min[dir]:
43 n = (value - self.min[dir]) * (max - min)
44 return min + (n + (self.max[dir] - self.min[dir]) / 2) / (self.max[dir] - self.min[dir])
71 def attachVolume(self, helem, dir): argument
72 self.volume[dir] = helem
73 self.volumeinfo[dir] = HInfo(helem)
74 self.min[dir] = self.volumeinfo[dir].min
75 self.max[dir] = self.volumeinfo[dir].max
76 …self.volumearray[dir] = HValue(helem).getArray(self.volumeinfo[dir].type, self.volumeinfo[dir].cou…
78 def attachSwitch(self, helem, dir): argument
79 self.switch[dir] = helem
80 self.switchinfo[dir] = HInfo(helem)
81 …self.switcharray[dir] = HValue(helem).getArray(self.switchinfo[dir].type, self.switchinfo[dir].cou…
100 def opsGetVolume(self, dir, chn): argument
101 return (0, self.volumeToUser(self.volumeinfo[dir], dir, self.volumearray[dir][chn]))
103 def opsSetVolume(self, dir, chn, value): argument
104 val = self.volumeFromUser(self.volumeinfo[dir], dir, value)
105 if self.volumearray[dir][chn] == val:
107 self.volumearray[dir][chn] = val
108 hv = HValue(self.volume[dir])
109 hv.setArray(self.volumeinfo[dir].type, self.volumearray[dir])
112 def opsGetSwitch(self, dir, chn): argument
113 return (0, self.switcharray[dir][chn])
115 def opsSetSwitch(self, dir, chn, value): argument
116 if self.switcharray[dir][chn] and value:
118 if not self.switcharray[dir][chn] and not value:
120 self.switcharray[dir] = int(value)
121 hv = HValue(self.switch[dir])
122 hv.setArray(self.switchinfo[dir].type, self.switcharray[dir])
148 def opsIsEnumerated(self, dir=-1): argument
149 if dir < 0:
151 if dir == 0 and self.mycaps & self.CAP_PENUM:
153 if dir == 1 and self.mycaps & self.CAP_CENUM:
156 def opsIsEnumCnt(self, dir): argument