本文整理汇总了Python中lib.buffer_utils.BufferUtils.set_app方法的典型用法代码示例。如果您正苦于以下问题:Python BufferUtils.set_app方法的具体用法?Python BufferUtils.set_app怎么用?Python BufferUtils.set_app使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.buffer_utils.BufferUtils
的用法示例。
在下文中一共展示了BufferUtils.set_app方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import set_app [as 别名]
def __init__(self, args, parent=None):
self._running = False
self.args = args
self.settings = Settings()
self.net = Networking(self)
BufferUtils.set_app(self)
self.scene = Scene(self)
self.plugins = PluginLoader()
self.mixer = Mixer(self)
# Create the default layer.
default_playlist = Playlist(self, self.args.playlist, 'last_playlist')
default_layer = Layer(self, 'default')
default_layer.set_playlist(default_playlist)
self.mixer.add_layer(default_layer)
if self.args.speech_layer:
speech_playlist = Playlist(self, self.args.speech_playlist, 'last_speech_playlist')
speech_layer = Layer(self, 'speech')
speech_layer.set_playlist(speech_playlist)
self.mixer.add_layer(speech_layer)
if self.args.route_layer:
route_playlist = Playlist(self, self.args.route_playlist, 'last_route_playlist')
route_layer = Layer(self, 'routes')
route_layer.set_playlist(route_playlist)
self.mixer.add_layer(route_layer)
self.scene.warmup()
self.aubio_connector = None
if not self.args.noaudio:
self.aubio_connector = AubioConnector()
self.aubio_connector.onset_detected.connect(self.mixer.onset_detected)
self.osc_server = None
if not self.args.noosc:
self.osc_server = OscServer(
self.args.osc_port, self.args.mixxx_osc_port, self.mixer)
self.osc_server.start()
if self.args.preset:
log.info("Setting constant preset %s" % args.preset)
self.mixer.set_constant_preset(args.preset)
QtCore.QThread.__init__(self, parent)
示例2: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import set_app [as 别名]
def __init__(self, parent, args):
QtCore.QThread.__init__(self, parent)
self._running = False
self.args = args
self.settings = Settings()
self.net = Networking(self)
BufferUtils.set_app(self)
self.scene = Scene(self)
self.plugins = PluginLoader()
self.mixer = Mixer(self)
self.playlist = Playlist(self)
self.qt_app = parent
self.gui = None
self.scene.warmup()
self.mixer.set_playlist(self.playlist)
if self.args.preset:
log.info("Setting constant preset %s" % args.preset)
self.mixer.set_constant_preset(args.preset)
示例3: __init__
# 需要导入模块: from lib.buffer_utils import BufferUtils [as 别名]
# 或者: from lib.buffer_utils.BufferUtils import set_app [as 别名]
def __init__(self, args, parent=None):
self._running = False
self.args = args
self.settings = Settings()
self.net = Networking(self)
BufferUtils.set_app(self)
self.scene = Scene(self)
self.plugins = PluginLoader()
self.mixer = Mixer(self)
# Create the default layer.
default_playlist = Playlist(self, self.args.playlist, 'last_playlist',
subdir = 'Music')
default_audiolist = Audiolist(self, self.args.audiobehaviors, 'last_audiolist',
subdir = 'Music')
default_layer = MusicLayer(self)
default_layer.set_playlist(default_playlist)
default_layer.set_audiolist(default_audiolist)
default_layer.setForeground()
self.mixer.add_layer(default_layer)
if self.args.speech_layer or self.args.all:
speech_playlist = Playlist(self, self.args.speech_playlist,
'last_speech_playlist', subdir = 'Speech')
speech_audiolist = Audiolist(self, self.args.speech_audiobehaviors,
'last_speech_audiolist', subdir = 'Speech')
speech_layer = SpeechLayer(self)
speech_layer.set_playlist(speech_playlist)
speech_layer.set_audiolist(speech_audiolist)
speech_layer.setBackground()
self.mixer.add_layer(speech_layer)
if self.args.leap_layer or self.args.all:
leap_playlist = Playlist(self, self.args.leap_playlist,
'last_leap_playlist', subdir = 'Leap')
leap_audiolist = Audiolist(self, self.args.leap_audiobehaviors,
'last_leap_audiolist', subdir = 'Leap')
leap_layer = LeapLayer(self)
leap_layer.set_playlist(leap_playlist)
leap_layer.set_audiolist(leap_audiolist)
leap_layer.setBackground()
self.mixer.add_layer(leap_layer)
self.scene.warmup()
self.aubio_connector = None
if not self.args.noaudio:
self.aubio_connector = AubioConnector()
self.aubio_connector.onset_detected.connect(self.mixer.onset_detected)
self.osc_server = None
if not self.args.noosc:
self.osc_server = OscServer(
self.args.osc_port, self.args.mixxx_osc_port, self.mixer)
self.osc_server.start()
if self.args.preset:
log.info("Setting constant preset %s" % args.preset)
self.mixer.set_constant_preset(args.preset)
QtCore.QThread.__init__(self, parent)