def get_status(self): if zynconf.is_process_running("jack_capture"): return "REC" elif self.current_record: return "PLAY" else: return None
def stop_recording(self): logging.info("STOPPING AUDIO RECORD ...") check_output("echo stop | jack_transport", shell=True) self.rec_proc.communicate() while zynconf.is_process_running("jack_capture"): sleep(0.2) self.update_list()
def get_status(self): status=None if zynconf.is_process_running("jack_capture"): status="REC" if self.current_record: if status=="REC": status="PLAY+REC" else: status="PLAY" return status
def stop_recording(self): logging.info("STOPPING AUDIO RECORD ...") try: self.zyngui.zyntransport.pause() self.rec_proc.communicate() while zynconf.is_process_running("jack_capture"): sleep(0.2) self.rec_proc = None except Exception as e: logging.error("ERROR STOPPING AUDIO RECORD: %s" % e) self.zyngui.show_info("ERROR STOPPING AUDIO RECORD:\n %s" % e) self.zyngui.hide_info_timer(5000) self.update_list()
def stop_recording(self): if self.get_status() in ("REC", "PLAY+REC"): logging.info("STOPPING AUDIO RECORD ...") try: self.zyngui.zyntransport.transport_stop() self.rec_proc.communicate() while zynconf.is_process_running("jack_capture"): sleep(0.2) self.rec_proc = None except Exception as e: logging.error("ERROR STOPPING AUDIO RECORD: %s" % e) self.zyngui.show_info("ERROR STOPPING AUDIO RECORD:\n %s" % e) self.zyngui.hide_info_timer(5000) self.update_list() return True else: return False