if parser.parse_args().createcache: parser.set_defaults(readcache=False) # Setup log file log.basicConfig( filename=LOG_DIR + '/music_and_lights.play.dbg', format= '[%(asctime)s] %(levelname)s {%(pathname)s:%(lineno)d} - %(message)s', level=log.INFO) args = parser.parse_args() # import hardware_controller import hardware_controller hc = hardware_controller.Hardware(param_config=args.config) # get copy of configuration manager cm = hc.cm if not args.playlist: args.playlist = cm.lightshow.playlist_path class Lightshow(object): def __init__(self): self.stream = None self.fm_process = None self.streaming = None self.sample_rate = None self.num_channels = None
help='create light timing cache without audio playback or lightshow.') if parser.parse_args().createcache: parser.set_defaults(readcache=False) # Setup log file log.basicConfig( filename=LOG_DIR + '/music_and_lights.play.dbg', format= '[%(asctime)s] %(levelname)s {%(pathname)s:%(lineno)d} - %(message)s', level=log.INFO) # import hardware_controller import hardware_controller hc = hardware_controller.Hardware() # get copy of configuration manager cm = hc.cm parser.set_defaults(playlist=cm.lightshow.playlist_path) args = parser.parse_args() class Lightshow(object): def __init__(self): self.stream = None self.fm_process = None self.streaming = None self.sample_rate = None self.num_channels = None