An open source DAW for GNU/Linux, inspired by modular synths.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.2 KiB

import functools
import asyncio
import logging
import threading
import time
import uuid
import quamash
from PyQt5.QtCore import Qt
from PyQt5 import QtCore
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from noisicaa import core
from noisicaa.core import ipc
from . import editor_app
from .. import runtime_settings
logger = logging.getLogger(__name__)
class UIProcessMixin(object):
def __init__(self, runtime_settings, paths, **kwargs):
super().__init__(**kwargs) = self.create_app(self, runtime_settings, paths)
def create_app(self, *args, **kwargs):
return editor_app.EditorApp(*args, **kwargs)
def create_event_loop(self):
return quamash.QEventLoop(
async def setup(self):
self._shutting_down = asyncio.Event()
await super().setup()
async def cleanup(self):
await super().cleanup()
async def run(self):
await self._shutting_down.wait()
return self.exit_code
def quit(self, exit_code=0):
self.exit_code = exit_code
class UIProcess(UIProcessMixin, core.ProcessImpl):