Add initial bits for Qt6 support
[carla.git] / source / libjack / libjack_base.cpp
blob62055598b83750c971fb456d06d2b2f1e4e06bba
1 /*
2 * Carla JACK API for external applications
3 * Copyright (C) 2016-2022 Filipe Coelho <falktx@falktx.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * For a full copy of the GNU General Public License see the doc/GPL.txt file.
18 #include "libjack.hpp"
20 // ---------------------------------------------------------------------------------------------------------------------
22 CARLA_PLUGIN_EXPORT
23 int jack_carla_interposed_action(uint, uint, void*)
25 static bool printWarning = true;
27 if (printWarning)
29 printWarning = false;
30 carla_stderr2("Non-exported jack_carla_interposed_action called, this should not happen!!");
31 carla_stderr("Printing some info:");
32 #ifdef CARLA_OS_MAC
33 carla_stderr("\tDYLD_LIBRARY_PATH: '%s'", std::getenv("DYLD_LIBRARY_PATH"));
34 carla_stderr("\tDYLD_INSERT_LIBRARIES: '%s'", std::getenv("DYLD_INSERT_LIBRARIES"));
35 carla_stderr("\tDYLD_FORCE_FLAT_NAMESPACE: '%s'", std::getenv("DYLD_FORCE_FLAT_NAMESPACE"));
36 #else
37 carla_stderr("\tLD_LIBRARY_PATH: '%s'", std::getenv("LD_LIBRARY_PATH"));
38 carla_stderr("\tLD_PRELOAD: '%s'", std::getenv("LD_PRELOAD"));
39 #endif
40 std::fflush(stderr);
43 // ::kill(::getpid(), SIGKILL);
44 return 1337;
47 // --------------------------------------------------------------------------------------------------------------------
49 CARLA_PLUGIN_EXPORT
50 void jack_get_version(int* major_ptr, int* minor_ptr, int* micro_ptr, int* proto_ptr)
52 carla_debug("%s(%p, %p, %p, %p)", __FUNCTION__, major_ptr, minor_ptr, micro_ptr, proto_ptr);
54 *major_ptr = 1;
55 *minor_ptr = 9;
56 *micro_ptr = 12;
57 *proto_ptr = 9; // FIXME
60 CARLA_PLUGIN_EXPORT
61 const char* jack_get_version_string(void)
63 carla_debug("%s()", __FUNCTION__);
65 static const char* const kVersionStr = "1.9.12";
66 return kVersionStr;
69 // --------------------------------------------------------------------------------------------------------------------
71 CARLA_PLUGIN_EXPORT
72 int jack_is_realtime(jack_client_t* client)
74 carla_debug("%s(%p)", __FUNCTION__, client);
75 return 1;
77 // unused
78 (void)client;
81 // --------------------------------------------------------------------------------------------------------------------
83 CARLA_PLUGIN_EXPORT
84 void jack_free(void* ptr)
86 carla_debug("%s(%p)", __FUNCTION__, ptr);
88 std::free(ptr);
91 // --------------------------------------------------------------------------------------------------------------------