Ejemplo n.º 1
0
 def __init__(self, hatch, buffering, live=True):
     self.append = False
     self.hatch = hatch
     self.out = None
     if (self.hatch.get('outfile') != None):
         self.out = io.open(self.hatch.get('outfile'), 'wb')
     self.buffering = buffering
     self.live = live
     self.timer = 0
     self.silence_timer = 0
     self.silence_counter = 0
     self.silence_buffer = []
     self.prepare = prepare.preparing(self.hatch)
Ejemplo n.º 2
0
 def __init__(self, cfg, buffering, live=True):
     self.append = False
     self.cfg = cfg
     self.out = None
     if (self.cfg.getoption('cmdlopt', 'outfile') != None):
         self.out = io.open(self.cfg.getoption('cmdlopt', 'outfile'), 'wb')
     self.buffering = buffering
     self.live = live
     self.timer = 0
     self.silence_timer = 0
     self.silence_buffer = []
     self.prepare = prepare.preparing(self.cfg)
     self.logger = self.cfg.getlogger().getlog()
     self.logger = logging.getLogger(__name__)
Ejemplo n.º 3
0
 def __init__(self, hatch, buffering, live=True):
     self.append = False
     self.hatch = hatch
     self.out = None
     if (self.hatch.get('outfile') != None):
         self.out = io.open(self.hatch.get('outfile'), 'wb')
     self.buffering = buffering
     self.live = live
     self.timer = 0
     self.silence_timer = 0
     self.silence_buffer = []
     self.prepare = prepare.preparing(self.hatch)
     self.logger = self.hatch.get('logger').getlog()
     self.logger = logging.getLogger(__name__)
Ejemplo n.º 4
0
 def __init__(self, endless_loop, debug, plot, wave, outfile, dict, buffering, live = True):
     self.append = False
     self.endless_loop = endless_loop
     self.debug = debug
     self.plot = plot
     self.wave = wave
     self.out = None
     if (outfile != None):
         self.out = io.open(outfile, 'wb')
     self.buffering = buffering
     self.dict = dict
     self.live = live
     self.timer = 0
     self.silence_timer = 0
     self.silence_counter = 0
     self.silence_buffer = [ ]
     self.prepare = prepare.preparing(debug, plot, wave, dict)
Ejemplo n.º 5
0
 def __init__(self, endless_loop, debug, plot, wave, outfile, dict, buffering, THRESHOLD = 500, live = True):
     self.append = False
     self.endless_loop = endless_loop
     self.debug = debug
     self.plot = plot
     self.wave = wave
     self.out = None
     if (outfile != None):
         self.out = io.open(outfile, 'wb')
     self.buffering = buffering
     self.dict = dict
     self.THRESHOLD = THRESHOLD
     self.live = live
     self.timer = 0
     self.silence_timer = 0
     self.silence_counter = 0
     self.silence_buffer = [ ]
     self.prepare = prepare.preparing(debug, plot, wave, dict)