本文整理汇总了Python中lib.buffer_utils.BufferUtils.init方法的典型用法代码示例。如果您正苦于以下问题:Python BufferUtils.init方法的具体用法?Python BufferUtils.init怎么用?Python BufferUtils.init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.buffer_utils.BufferUtils
的用法示例。
在下文中一共展示了BufferUtils.init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import init [as 别名]
def __init__(self, app):
super(Mixer, self).__init__()
self._app = app
self._net = app.net
self._scene = app.scene
self._tick_rate = self._app.settings.get('mixer')['tick-rate']
self._tick_timer = None
self._running = False
self._enable_rendering = True
self._main_buffer = None
self._tick_time_data = dict()
self._num_frames = 0
self._last_frame_time = 0.0
self._start_time = 0.0
self._stop_time = 0.0
self._enable_profiling = self._app.args.profile
self._paused = self._app.settings.get('mixer').get('paused', False)
self._frozen = False
self._last_onset_time = 0.0
self._onset_holdoff = self._app.settings.get('mixer')['onset-holdoff']
self._onset = False
self._reset_onset = False
self._global_dimmer = 1.0
self._global_speed = 1.0
self._render_in_progress = False
self._last_tick_time = time.time()
self._audio_emitters_by_group = {}
self._layers = []
self._leap_controller = Leap.Controller()
if self._app.args.yappi and USE_YAPPI:
yappi.start()
if not self._scene:
log.warn("No scene assigned to mixer. Preset rendering and transitions are disabled.")
self._enable_rendering = False
else:
log.info("Warming up BufferUtils cache...")
BufferUtils.init()
log.info("Completed BufferUtils cache warmup")
log.info("Initializing preset rendering buffer")
fh = self._scene.fixture_hierarchy()
self._main_buffer = BufferUtils.create_buffer()
示例2: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import init [as 别名]
def __init__(self, app):
super(Mixer, self).__init__()
self._app = app
self._net = app.net
self.playlist = None
self._scene = app.scene
self._tick_rate = self._app.settings.get('mixer')['tick-rate']
self._in_transition = False
self._start_transition = False
self._transition_duration = self._app.settings.get('mixer')['transition-duration']
self._transition_slop = self._app.settings.get('mixer')['transition-slop']
self._tick_timer = None
self._duration = self._app.settings.get('mixer')['preset-duration']
self._elapsed = 0.0
self._running = False
self._enable_rendering = True
self._buffer_a = None
self._max_pixels = 0
self._tick_time_data = dict()
self._num_frames = 0
self._last_frame_time = 0.0
self._start_time = 0.0
self._stop_time = 0.0
self._strand_keys = list()
self._enable_profiling = self._app.args.profile
self._paused = self._app.settings.get('mixer').get('paused', False)
self._frozen = False
self._last_onset_time = 0.0
self._onset_holdoff = self._app.settings.get('mixer')['onset-holdoff']
self._onset = False
self._reset_onset = False
self._global_dimmer = 1.0
self._global_speed = 1.0
self._render_in_progress = False
self._last_tick_time = 0.0
self.transition_progress = 0.0
self.audio = Audio(self)
if self._app.args.yappi and USE_YAPPI:
print "yappi start"
yappi.start()
# Load transitions
self.set_transition_mode(self._app.settings.get('mixer')['transition'])
if not self._scene:
log.warn("No scene assigned to mixer. Preset rendering and transitions are disabled.")
self._transition_duration = 0.0
self._enable_rendering = False
else:
log.info("Warming up BufferUtils cache...")
BufferUtils.init()
log.info("Completed BufferUtils cache warmup")
log.info("Initializing preset rendering buffer")
fh = self._scene.fixture_hierarchy()
for strand in fh:
self._strand_keys.append(strand)
(maxs, maxp) = self._scene.get_matrix_extents()
self._buffer_a = BufferUtils.create_buffer()
self._buffer_b = BufferUtils.create_buffer()
self._max_pixels = maxp
示例3: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import init [as 别名]
def __init__(self, app):
super(Mixer, self).__init__()
self._app = app
self._net = app.net
self.playlist = None
self._scene = app.scene
self._tick_rate = self._app.settings.get("mixer")["tick-rate"]
self._in_transition = False
self._start_transition = False
self._transition_scrubbing = False
self._transition_duration = self._app.settings.get("mixer")["transition-duration"]
self._transition_slop = self._app.settings.get("mixer")["transition-slop"]
self._tick_timer = None
self._duration = self._app.settings.get("mixer")["preset-duration"]
self._elapsed = 0.0
self.running = False
self._buffer_a = None
self._max_pixels = 0
self._tick_time_data = dict()
self._num_frames = 0
self._last_frame_time = 0.0
self._start_time = 0.0
self._stop_time = 0.0
self._strand_keys = list()
self._enable_profiling = self._app.args.profile
self._paused = self._app.settings.get("mixer").get("paused", False)
self._frozen = False
self._last_onset_time = 0.0
self._onset_holdoff = self._app.settings.get("mixer")["onset-holdoff"]
self._onset = False
self._reset_onset = False
self.global_dimmer = 1.0
self.global_speed = 1.0
self._render_in_progress = False
self._last_tick_time = 0.0
self._fps_time = 0.0
self._fps_frames = 0
self._fps = 0.0
self.last_time = time.time()
self.transition_progress = 0.0
self.audio = Audio(self)
self._fft_data = None
if self._app.args.yappi and USE_YAPPI:
print "yappi start"
yappi.start()
# Load transitions
self.set_transition_mode(self._app.settings.get("mixer")["transition"])
log.info("Warming up BufferUtils cache...")
BufferUtils.init()
log.info("Completed BufferUtils cache warmup")
log.info("Initializing preset rendering buffer")
fh = self._scene.fixture_hierarchy()
for strand in fh:
self._strand_keys.append(strand)
(maxs, maxp) = self._scene.get_matrix_extents()
self._buffer_a = BufferUtils.create_buffer()
self._buffer_b = BufferUtils.create_buffer()
self._max_pixels = maxp