root/branches/libffado-2.0/support/mixer/mixer_edirolfa66.py

Revision 1106, 2.0 kB (checked in by arnonym, 14 years ago)

Not my day. Remove the modal parameter from the arguments.

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_edirolfa66ui import *
25
26 class EdirolFa66Control(EdirolFa66ControlUI):
27     def __init__(self,parent = None,name = None,fl = 0):
28         EdirolFa66ControlUI.__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('spdif', a0)
41
42     def setVolume(self,a0,a1):
43             name = a0
44             vol = -a1
45             print "setting %s volume to %d" % (name, vol)
46             self.hw.setContignuous(self.VolumeControls[name][0], vol)
47
48     def init(self):
49             print "Init Edirol FA-66 window"
50
51             self.VolumeControls={
52                 'line12'  :   ['/Mixer/Feature_1', self.sldInput12],
53                 'line34'  :   ['/Mixer/Feature_2', self.sldInput34],
54                 'spdif'   :   ['/Mixer/Feature_3', self.sldInput56],
55                 }
56
57     def initValues(self):
58             for name, ctrl in self.VolumeControls.iteritems():
59                 vol = self.hw.getContignuous(ctrl[0])
60                 print "%s volume is %d" % (name , vol)
61                 ctrl[1].setValue(-vol)
Note: See TracBrowser for help on using the browser.