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.

80 lines
2.1KB

  1. /*
  2. * Carla JACK API for external applications
  3. * Copyright (C) 2016-2017 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. // need to include this first
  18. #include "libjack.hpp"
  19. CARLA_BACKEND_USE_NAMESPACE
  20. // --------------------------------------------------------------------------------------------------------------------
  21. CARLA_EXPORT
  22. int jack_set_freewheel(jack_client_t*, int)
  23. {
  24. carla_stdout("CarlaJackClient :: %s", __FUNCTION__);
  25. return 1;
  26. }
  27. CARLA_EXPORT
  28. int jack_set_buffer_size(jack_client_t*, jack_nframes_t)
  29. {
  30. carla_stdout("CarlaJackClient :: %s", __FUNCTION__);
  31. return 1;
  32. }
  33. CARLA_EXPORT
  34. jack_nframes_t jack_get_sample_rate(jack_client_t* client)
  35. {
  36. carla_debug("CarlaJackClient :: %s", __FUNCTION__);
  37. CarlaJackClient* const jclient = (CarlaJackClient*)client;
  38. CARLA_SAFE_ASSERT_RETURN(jclient != nullptr, 0);
  39. const JackClientState& jstate(jclient->fState);
  40. return jstate.sampleRate;
  41. }
  42. CARLA_EXPORT
  43. jack_nframes_t jack_get_buffer_size(jack_client_t* client)
  44. {
  45. carla_stdout("CarlaJackClient :: %s", __FUNCTION__);
  46. CarlaJackClient* const jclient = (CarlaJackClient*)client;
  47. CARLA_SAFE_ASSERT_RETURN(jclient != nullptr, 0);
  48. const JackClientState& jstate(jclient->fState);
  49. return jstate.bufferSize;
  50. }
  51. CARLA_EXPORT
  52. int jack_engine_takeover_timebase(jack_client_t*)
  53. {
  54. return ENOSYS;
  55. }
  56. CARLA_EXPORT
  57. float jack_cpu_load(jack_client_t*)
  58. {
  59. return 0.0f;
  60. }
  61. // --------------------------------------------------------------------------------------------------------------------