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

Revision 1336, 2.4 kB (checked in by ppalmers, 16 years ago)

Bring trunk up to date with branches/libffado-2.0:

"""
svn merge -r 1254:1299 svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0
svn merge -r 1301:1320 svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0
svn merge -r 1322:1323 svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0
svn merge -r 1329:HEAD svn+ssh://ffadosvn@ffado.org/ffado/branches/libffado-2.0
"""

Add getSupportedSamplingFrequencies() to DICE, RME and Metric Halo AvDevices?

Line 
1 #
2 # Copyright (C) 2008 by Arnold Krille
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_globalui import *
25
26 class GlobalMixer( GlobalMixerUi ):
27         def __init__( self, parent ):
28                 GlobalMixerUi.__init__( self, parent )
29
30         def clockChanged( self, clock ):
31                 #print "updateClockSource( " + str(clock) + " )"
32                 self.clockselect.select( clock )
33                 selected = self.clockselect.selected()
34
35                 if selected != clock:
36                         clockname = self.clockselect.getEnumLabel( clock )
37                         msg = QMessageBox()
38                         msg.question( msg, "Failed to select clock source", \
39                                 "<qt>Could not select %s as clock source.</qt>" % clockname, \
40                                 QMessageBox.Ok )
41                         self.clocksource.setCurrentItem( selected )
42
43         def samplerateChanged( self, sr ):
44                 print "samplerateChanged( " + str(sr) + " )"
45                 self.samplerateselect.select( sr )
46                 selected = self.samplerateselect.selected()
47
48                 if selected != sr:
49                         srname = self.samplerateselect.getEnumLabel( sr )
50                         msg = QMessageBox()
51                         msg.question( msg, "Failed to select sample rate", \
52                                 "<qt>Could not select %s as samplerate.</qt>" % srname, \
53                                 QMessageBox.Ok )
54                         self.samplerate.setCurrentItem( selected )
55
56         def nicknameChanged( self, name ):
57                 #print "nicknameChanged( %s )" % name
58                 self.nickname.setText( name.latin1() )
59
60         def initValues( self ):
61                 #print "GlobalMixer::initValues()"
62                 for i in range( self.clockselect.count() ):
63                         self.clocksource.insertItem( self.clockselect.getEnumLabel( i ) )
64                 self.clocksource.setCurrentItem( self.clockselect.selected() )
65
66                 for i in range( self.samplerateselect.count() ):
67                         self.samplerate.insertItem( self.samplerateselect.getEnumLabel( i ) )
68                 self.samplerate.setCurrentItem( self.samplerateselect.selected() )
69
70                 self.txtNickname.setText( self.nickname.text() )
71
Note: See TracBrowser for help on using the browser.