2 # -*- coding: utf-8 -*-
4 # --------------------------------------------------------------------------------------------------------
6 from carla_backend
import *
7 from signal
import signal
, SIGINT
, SIGTERM
11 # --------------------------------------------------------------------------------------------------------
13 class CarlaObject(object):
18 gCarla
= CarlaObject()
21 def signalHandler(sig
, frame
):
22 if sig
in (SIGINT
, SIGTERM
):
25 # --------------------------------------------------------------------------------------------------------
27 binaryDir
= "/home/falktx/Personal/FOSS/GIT/falkTX/Carla/bin"
28 host
= CarlaHostDLL("/home/falktx/FOSS/GIT-mine/falkTX/Carla/bin/libcarla_standalone2.so", False)
29 host
.set_engine_option(ENGINE_OPTION_PATH_BINARIES
, 0, binaryDir
)
31 if not host
.engine_init("JACK", "Carla-uhe-test"):
32 print("Engine failed to initialize, possible reasons:\n%s" % host
.get_last_error())
35 if not host
.add_plugin(BINARY_NATIVE
, PLUGIN_VST2
, "/home/falktx/.vst/u-he/ACE.64.so", "", "", 0, None, 0):
36 print("Failed to load plugin, possible reasons:\n%s" % host
.get_last_error())
40 signal(SIGINT
, signalHandler
)
41 signal(SIGTERM
, signalHandler
)
43 while host
.is_engine_running() and not gCarla
.term
:
48 print("Engine closed abruptely")
50 if not host
.engine_close():
51 print("Engine failed to close, possible reasons:\n%s" % host
.get_last_error())
54 # --------------------------------------------------------------------------------------------------------