root/trunk/libffado/support/mixer-qt4/ffado/mixer/presonus_experimental.py

Revision 1901, 2.0 kB (checked in by arnonym, 10 years ago)

Lets add an experimental mixer for presonus firepod/firebox for the time being. On my firepod the volume-faders work but no audible change happens as it seems. But maybe this helps firebox users to get the device unmuted (see #191).

Note that this mixer might also work on other bebob-based devices. But for that I need to spend some more time with it...

Line 
1 #
2 # Copyright (C) 2010 by Arnold Krille <arnold@arnoldarts.de>
3 #
4 # This file is part of FFADO
5 # FFADO = Free Firewire (pro-)audio drivers for linux
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 2 of the License, or
10 # version 3 of the License.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 #
20
21 from PyQt4 import QtGui, QtCore, Qt
22 import dbus
23
24 from ffado.config import *
25
26 class Presonus_Experimental(QtGui.QWidget):
27     def __init__(self, parent=None):
28         QtGui.QWidget.__init__(self, parent)
29         uicLoad('ffado/mixer/presonus_experimental', self)
30
31     def buildMixer(self):
32         #print self.hw
33         #print 'Servername = "%s"\nBasename = "%s"' % (self.hw.servername, self.hw.basepath)
34         bus = self.hw.bus
35         self.ifaces = list()
36         for feature in ['Volume_1', 'Volume_2', 'Volume_3', 'Volume_4', 'LRBalance_1', 'LRBalance_2', 'LRBalance_3', 'LRBalance_4']:
37             dev = bus.get_object(self.hw.servername, self.hw.basepath+'/Mixer/Feature_%s' % feature)
38             #print dev
39             iface = dbus.Interface(dev, dbus_interface='org.ffado.Control.Element.Continuous')
40             self.ifaces.append(iface)
41             #print iface
42             #print iface.getValue(), iface.getMinimum(), iface.getMaximum()
43             obj = self.findChild(QtGui.QWidget, feature)
44             #print obj
45             obj.setMinimum(iface.getMinimum())
46             obj.setMaximum(iface.getMaximum())
47             obj.setValue(iface.getValue())
48             self.connect(obj, QtCore.SIGNAL("valueChanged(int)"), iface.setValue)
49
50 #
51 # vim: et ts=4 sw=4
Note: See TracBrowser for help on using the browser.