root/trunk/libffado/support/mixer/mixer_edirolfa101.py

Revision 1326, 2.3 kB (checked in by wagi, 16 years ago)

Merge r1325 back to trunk.

Line 
1 #
2 # Copyright (C) 2005-2008 by Daniel Wagner
3 #
4 # This file is part of FFADO
5 # FFADO = Free Firewire (pro-)audio drivers for linux
6 #
7 # FFADO is based upon FreeBoB.
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 2 of the License, or
12 # (at your option) version 3 of the License.
13 #
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 #
22
23 from qt import *
24 from mixer_edirolfa101ui import *
25
26 class EdirolFa101Control(EdirolFa101ControlUI):
27     def __init__(self,parent = None,name = None,fl = 0):
28         EdirolFa101ControlUI.__init__(self,parent,name,fl)
29
30     def setComboMixSource(self,a0):
31             self.setSelector('line34source', a0)
32
33     def setVolumeIn12(self,a0):
34             self.setVolume('line12', a0)
35
36     def setVolumeIn34(self,a0):
37             self.setVolume('line34', a0)
38
39     def setVolumeIn56(self,a0):
40             self.setVolume('line56', a0)
41
42     def setVolumeIn78(self,a0):
43             self.setVolume('line78', a0)
44
45     def setVolumeIn910(self,a0):
46             self.setVolume('spdif', a0)
47
48     def setVolume(self,a0,a1):
49             name = a0
50             vol = -a1
51             print "setting %s volume to %d" % (name, vol)
52             self.hw.setContignuous(self.VolumeControls[name][0], vol)
53
54     def init(self):
55             print "Init Edirol FA-101 window"
56
57             self.VolumeControls={
58                 'line12'  :   ['/Mixer/Feature_5', self.sldInput12],
59                 'line34'  :   ['/Mixer/Feature_1', self.sldInput34],
60                 'line56'  :   ['/Mixer/Feature_2', self.sldInput56],
61                 'line78'  :   ['/Mixer/Feature_3', self.sldInput78],
62                 'spdif'   :   ['/Mixer/Feature_4', self.sldInput910],
63                 }
64
65     def initValues(self):
66             for name, ctrl in self.VolumeControls.iteritems():
67                 vol = self.hw.getContignuous(ctrl[0])
68                 print "%s volume is %d" % (name , vol)
69                 ctrl[1].setValue(-vol)
Note: See TracBrowser for help on using the browser.