Cleanup
[carla.git] / source / frontend / carla-jack-multi
blobc5b98148adb185c47d16669502ca545a98dcb932
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-Multi-Client", libPrefix)
26     # ------------------------------------------------------------------------------------------------------------------
27     # Set-up custom signal handling
29     setUpSignals()
31     # ------------------------------------------------------------------------------------------------------------------
32     # Init host backend
34     os.environ["CARLA_NSM_NAME"] = "Carla-Multi-Client"
36     host = initHost(initName, libPrefix, False, False, True)
37     host.audioDriverForced = "JACK"
38     host.processMode       = ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS
39     host.processModeForced = True
40     host.transportMode     = ENGINE_TRANSPORT_MODE_JACK
41     loadHostSettings(host)
43     # ------------------------------------------------------------------------------------------------------------------
44     # Create GUI
46     gui = HostWindow(host, True)
48     # ------------------------------------------------------------------------------------------------------------------
49     # Show GUI
51     gui.showIfNeeded()
53     # ------------------------------------------------------------------------------------------------------------------
54     # App-Loop
56     app.exit_exec()