def dac_thread(): while True: try: d = dac.DAC(dac.find_first_dac()) d.play_stream(ps) except Exception as e: print e pass
def dac_thread(load_sim): global PLAYERS, DRAW print "starting dac thread", load_sim while True: try: if load_sim == 0: print "looking for dac", dac.find_first_dac() d = dac.DAC(dac.find_first_dac()) d.play_stream(ps) else: print "found dac?" simulator.play_stream(ps) except Exception as e: import sys, traceback print '\n---------------------' print 'Exception: %s' % e print '- - - - - - - - - - -' traceback.print_tb(sys.exc_info()[2]) print "\n" pass
def dac_thread(): global PLAYERS, DRAW while True: try: d = dac.DAC(dac.find_first_dac()) d.play_stream(ps) #simulator.play_stream(ps) except Exception as e: import sys, traceback print '\n---------------------' print 'Exception: %s' % e print '- - - - - - - - - - -' traceback.print_tb(sys.exc_info()[2]) print "\n" pass