root/trunk/libffado/support/mixer-qt4/mixer_rme.py

Revision 1601, 2.1 kB (checked in by jwoithe, 14 years ago)

RME: implement mixer skeleton to allow device configuration functionality to be tested. Note that none of the included controls are functional yet.

Line 
1 #
2 # Copyright (C) 2009 by Jonathan Woithe
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 PyQt4.QtCore import SIGNAL, SLOT, QObject, Qt
24 from PyQt4.QtGui import QWidget, QApplication
25 from mixer_rmeui import *
26
27 import logging
28 log = logging.getLogger('rme')
29
30 # Model defines.  These must agree with what is used in fireface_def.h.
31 RME_MODEL_FF400     = 0x0000
32 RME_MODEL_FF800     = 0x0001
33
34 class RmeMixer(QWidget, Ui_RmeMixerUI):
35     def __init__(self,parent = None):
36         QWidget.__init__(self,parent)
37         self.setupUi(self)
38
39         self.init()
40
41     def init(self):
42
43         # Other mixer variables
44         self.is_streaming = 0
45         self.sample_rate = 0
46         self.model = 0
47
48     # Hide and disable a control
49     def disable_hide(self,widget):
50         widget.hide()
51         widget.setEnabled(False)
52
53     def initValues(self):
54         # Is the device streaming?
55         #self.is_streaming = self.hw.getDiscrete('/Mixer/Info/IsStreaming')
56         self.is_streaming = 0
57         #log.debug("device streaming flag: %d" % (self.is_streaming))
58
59         # Retrieve other device settings as needed and customise the UI
60         # based on these options.
61         #self.model = self.hw.getDiscrete('/Mixer/Info/Model')
62         #log.debug("device model identifier: %d" % (self.model))
63         #self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate')
64         #log.debug("device sample rate: %d" % (self.sample_rate))
Note: See TracBrowser for help on using the browser.