def quit(self): from supriya.tools import requesttools if not self.is_running: return if self.recorder.is_recording: self.recorder.stop() request = requesttools.QuitRequest() request.communicate(server=self) self._is_running = False if not self._server_process.terminate(): self._server_process.wait() self._osc_controller.quit() self._teardown() PubSub.notify('server-quit') return self
def quit(self): from supriya.tools import requesttools if not self.is_running: return if self.recorder.is_recording: self.recorder.stop() request = requesttools.QuitRequest() request.communicate(server=self) self._is_running = False if not self._server_process.terminate(): self._server_process.wait() self._osc_controller.quit() self._teardown() PubSub.notify("server-quit") return self
def boot(self, server_options=None, **kwargs): from supriya import new from supriya import supriya_configuration from supriya.tools import servertools if self.is_running: return self scsynth_path = supriya_configuration.scsynth_path self._osc_controller.boot() server_options = server_options or servertools.ServerOptions() assert isinstance(server_options, servertools.ServerOptions) if kwargs: server_options = new(server_options, **kwargs) options_string = server_options.as_options_string(self.port) command = '{} {} -V -1'.format(scsynth_path, options_string) self._server_process = subprocess.Popen(command, shell=True) time.sleep(0.25) self._is_running = True self._server_options = server_options self._setup() self.sync() PubSub.notify('server-booted') return self
def boot(self, server_options=None, **kwargs): from supriya import new from supriya import supriya_configuration from supriya.tools import servertools if self.is_running: return self scsynth_path = supriya_configuration.scsynth_path self._osc_controller.boot() server_options = server_options or servertools.ServerOptions() assert isinstance(server_options, servertools.ServerOptions) if kwargs: server_options = new(server_options, **kwargs) options_string = server_options.as_options_string(self.port) command = "{} {} -V -1".format(scsynth_path, options_string) self._server_process = subprocess.Popen(command, shell=True) time.sleep(0.25) self._is_running = True self._server_options = server_options self._setup() self.sync() PubSub.notify("server-booted") return self