Beispiel #1
0
 def set_card_mixer(self, mixer = None, cid = 0):
     if( not mixer ):
         mixers = CardInfo.get_mixers(self.getint(self.get_default_section(), "card_index"))
         if (mixers):
             (mixer, cid) = mixers[0]
         else:
             mixer = "Master"
     c = self.get_card_section()
     self.set(c, "control", mixer)
     self.set(c, "cid", cid)
Beispiel #2
0
 def set_liststore(self, card_index, liststore):
     card_index_cmp = self.config.getint(self.config.get_default_section(), "card_index")
     default_mixer = self.config.get(self.config.get_card_section(), "control")
     default_cid = self.config.getint(self.config.get_card_section(), "cid")
     mixers = CardInfo.get_mixers(card_index)
     liststore.clear()
     log.Notice("default_mixer = %s, default_cid = %i" % (default_mixer, default_cid))
     for mixer, cid in mixers:
         active = (card_index == card_index_cmp and mixer == default_mixer and cid == default_cid )
         weight = pango.WEIGHT_NORMAL
         if active:
             weight = pango.WEIGHT_BOLD
         liststore.append([active, weight, mixer, cid])
Beispiel #3
0
 def init(self):
     for control_name, cid in CardInfo.get_mixers(self.card_index):
         self.add_control(MixerControlFrame(self.config, self.card_index, control_name, cid))