Update CI version
[carla.git] / source / frontend / carla-jack-single
blob2049f535434d2a88335d6edfe379ac1bd2a20e7c
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
4 # Carla plugin host
5 # Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com>
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License as
9 # published by the Free Software Foundation; either version 2 of
10 # the License, or any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # For a full copy of the GNU General Public License see the doc/GPL.txt file.
19 # ----------------------------------------------------------------------------------------------------------------------
20 # Imports (Custom Stuff)
22 from carla_host import *
24 # ----------------------------------------------------------------------------------------------------------------------
25 # Main
27 if __name__ == '__main__':
28     # ------------------------------------------------------------------------------------------------------------------
29     # Read CLI args
31     initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)
33     # ------------------------------------------------------------------------------------------------------------------
34     # App initialization
36     app = CarlaApplication("Carla2-Single-Client", libPrefix)
38     # ------------------------------------------------------------------------------------------------------------------
39     # Set-up custom signal handling
41     setUpSignals()
43     # ------------------------------------------------------------------------------------------------------------------
44     # Init host backend
46     os.environ["CARLA_NSM_NAME"] = "Carla-Single-Client"
48     host = initHost(initName, libPrefix, False, False, True)
49     host.audioDriverForced = "JACK"
50     host.processMode       = ENGINE_PROCESS_MODE_SINGLE_CLIENT
51     host.processModeForced = True
52     host.transportMode     = ENGINE_TRANSPORT_MODE_JACK
53     loadHostSettings(host)
55     # ------------------------------------------------------------------------------------------------------------------
56     # Create GUI
58     gui = HostWindow(host, not(LADISH_APP_NAME))
60     # ------------------------------------------------------------------------------------------------------------------
61     # Show GUI
63     gui.showIfNeeded()
65     # ------------------------------------------------------------------------------------------------------------------
66     # App-Loop
68     app.exit_exec()