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

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

RME: remove unused defines. Correct model defines in the RME mixer application.

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 rme_avdevice.h.
31 RME_MODEL_NONE      = 0x0000
32 RME_MODEL_FF800     = 0x0001
33 RME_MODEL_FF400     = 0x0002
34
35 class RmeMixer(QWidget, Ui_RmeMixerUI):
36     def __init__(self,parent = None):
37         QWidget.__init__(self,parent)
38         self.setupUi(self)
39
40         self.init()
41
42     def init(self):
43
44         # Other mixer variables
45         self.is_streaming = 0
46         self.sample_rate = 0
47         self.model = 0
48
49     # Hide and disable a control
50     def disable_hide(self,widget):
51         widget.hide()
52         widget.setEnabled(False)
53
54     def initValues(self):
55         # Is the device streaming?
56         #self.is_streaming = self.hw.getDiscrete('/Mixer/Info/IsStreaming')
57         self.is_streaming = 0
58         #log.debug("device streaming flag: %d" % (self.is_streaming))
59
60         # Retrieve other device settings as needed and customise the UI
61         # based on these options.
62         #self.model = self.hw.getDiscrete('/Mixer/Info/Model')
63         #log.debug("device model identifier: %d" % (self.model))
64         #self.sample_rate = self.hw.getDiscrete('/Mixer/Info/SampleRate')
65         #log.debug("device sample rate: %d" % (self.sample_rate))
Note: See TracBrowser for help on using the browser.