Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.7KB

  1. /*
  2. * Carla JACK API for external applications
  3. * Copyright (C) 2016-2020 Filipe Coelho <falktx@falktx.com>
  4. *
  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.
  9. *
  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.
  14. *
  15. * For a full copy of the GNU General Public License see the doc/GPL.txt file.
  16. */
  17. #include "libjack.hpp"
  18. // ---------------------------------------------------------------------------------------------------------------------
  19. CARLA_EXPORT
  20. int jack_carla_interposed_action(uint, uint, void*)
  21. {
  22. static bool printWarning = true;
  23. if (printWarning)
  24. {
  25. printWarning = false;
  26. carla_stderr2("Non-exported jack_carla_interposed_action called, this should not happen!!");
  27. carla_stderr("Printing some info:");
  28. carla_stderr("\tLD_LIBRARY_PATH: '%s'", std::getenv("LD_LIBRARY_PATH"));
  29. carla_stderr("\tLD_PRELOAD: '%s'", std::getenv("LD_PRELOAD"));
  30. std::fflush(stderr);
  31. }
  32. // ::kill(::getpid(), SIGKILL);
  33. return 1337;
  34. }
  35. // --------------------------------------------------------------------------------------------------------------------
  36. CARLA_BACKEND_USE_NAMESPACE
  37. // --------------------------------------------------------------------------------------------------------------------
  38. CARLA_EXPORT
  39. void jack_get_version(int* major_ptr, int* minor_ptr, int* micro_ptr, int* proto_ptr)
  40. {
  41. carla_debug("%s(%p, %p, %p, %p)", __FUNCTION__, major_ptr, minor_ptr, micro_ptr, proto_ptr);
  42. *major_ptr = 1;
  43. *minor_ptr = 9;
  44. *micro_ptr = 12;
  45. *proto_ptr = 9; // FIXME
  46. }
  47. CARLA_EXPORT
  48. const char* jack_get_version_string(void)
  49. {
  50. carla_debug("%s()", __FUNCTION__);
  51. static const char* const kVersionStr = "1.9.12";
  52. return kVersionStr;
  53. }
  54. // --------------------------------------------------------------------------------------------------------------------
  55. CARLA_EXPORT
  56. int jack_is_realtime(jack_client_t* client)
  57. {
  58. carla_debug("%s(%p)", __FUNCTION__, client);
  59. return 1;
  60. // unused
  61. (void)client;
  62. }
  63. // --------------------------------------------------------------------------------------------------------------------
  64. CARLA_EXPORT
  65. void jack_free(void* ptr)
  66. {
  67. carla_debug("%s(%p)", __FUNCTION__, ptr);
  68. std::free(ptr);
  69. }
  70. // --------------------------------------------------------------------------------------------------------------------