Cleanup
[carla.git] / source / frontend / carla-patchbay
blob757a2ce9e16d52b9ed2b648fcd283bc9b0aa0c10
1 #!/usr/bin/env python3
2 # SPDX-FileCopyrightText: 2011-2024 Filipe Coelho <falktx@falktx.com>
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 # ----------------------------------------------------------------------------------------------------------------------
6 # Imports (Custom Stuff)
8 from carla_host import *
10 # ----------------------------------------------------------------------------------------------------------------------
11 # Main
13 if __name__ == '__main__':
14     import resources_rc
16     # ------------------------------------------------------------------------------------------------------------------
17     # Read CLI args
19     initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
21     # ------------------------------------------------------------------------------------------------------------------
22     # App initialization
24     app = CarlaApplication("Carla2-Patchbay", libPrefix)
26     # ------------------------------------------------------------------------------------------------------------------
27     # Set-up custom signal handling
29     setUpSignals()
31     # ------------------------------------------------------------------------------------------------------------------
32     # Init host backend
34     os.environ["CARLA_NSM_NAME"] = "Carla-Patchbay"
36     host = initHost(initName, libPrefix, False, False, True)
37     host.processMode       = ENGINE_PROCESS_MODE_PATCHBAY
38     host.processModeForced = True
39     loadHostSettings(host)
41     # ------------------------------------------------------------------------------------------------------------------
42     # Create GUI
44     gui = HostWindow(host, True)
46     # ------------------------------------------------------------------------------------------------------------------
47     # Show GUI
49     gui.showIfNeeded()
51     # ------------------------------------------------------------------------------------------------------------------
52     # App-Loop
54     app.exit_exec()