Logo Search packages:      
Sourcecode: jokosher version File versions  Download package

def Project::Project::record (   self  ) 

Start all selected instruments recording

Definition at line 265 of file Project.py.

00265                       :
            '''Start all selected instruments recording'''

            #Add all instruments to the pipeline
            numInstruments = 0
            for instr in self.instruments:
                  if instr.isArmed:
                        numInstruments += 1

            #Check mixer states for all devices
            recMixers = []
            for device in GetAlsaList('capture').values():
                  if device != 'default':
                        #FIXME: Checking mixer states would be best handled via the record-toggled signal
                        #in the GstMixer interface, unfortunately alsamixer doesn't support signals 
                        #See bug: http://bugzilla.gnome.org/show_bug.cgi?id=152864       
                        #This hasn't been resolved for nearly 2 years, so I'm having to talk to alsa 
                        #directly instead. This'll make porting to different sound systems a bit of a pain.
                        recMixers += GetRecordingMixers(device)

            #Make sure the number of recording mixers corresponds to the number of recording instruments
            #This will fail if a sound card doesn't support multiple simultanious inputs and is being told to
            #record multiple instruments at the same time.
            if len(recMixers) < numInstruments:
                  raise MultipleInputsError("Your sound card is incapable of multiple simultanious inputs")
            #Make sure we start playing from the beginning
00295             self.state_id = self.bus.connect("message::state-changed", self.state_changed)

            # [DEBUG]
            # This debug block will be removed when we release. If you see this in a release version, we
            # obviously suck. Please email us and tell us about how shit we are.
                  if os.environ['JOKOSHER_DEBUG']:
                        print "Play Pipeline:"
            # [/DEBUG]

      def state_changed(self, bus, message, movePlayhead=True):

Generated by  Doxygen 1.6.0   Back to index