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.

83 lines
2.1KB

  1. /*
  2. * Carla Tests
  3. * Copyright (C) 2014 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. #include <stdint.h>
  16. #define PRE_PACKED_STRUCTURE
  17. #define POST_PACKED_STRUCTURE __attribute__((__packed__))
  18. extern "C" {
  19. enum JackTransportState {
  20. JackTransportStopped = 0,
  21. JackTransportRolling = 1,
  22. JackTransportLooping = 2,
  23. JackTransportStarting = 3
  24. };
  25. enum JackPositionBits {
  26. JackPositionBBT = 0x010,
  27. JackPositionTimecode = 0x020,
  28. JackBBTFrameOffset = 0x040,
  29. JackAudioVideoRatio = 0x080,
  30. JackVideoFrameOffset = 0x100
  31. };
  32. typedef uint32_t jack_nframes_t;
  33. typedef uint64_t jack_time_t;
  34. typedef uint64_t jack_unique_t;
  35. typedef enum JackTransportState jack_transport_state_t;
  36. typedef enum JackPositionBits jack_position_bits_t;
  37. PRE_PACKED_STRUCTURE
  38. struct _jack_position {
  39. jack_unique_t unique_1;
  40. jack_time_t usecs;
  41. jack_nframes_t frame_rate;
  42. jack_nframes_t frame;
  43. jack_position_bits_t valid;
  44. int32_t bar;
  45. int32_t beat;
  46. int32_t tick;
  47. double bar_start_tick;
  48. float beats_per_bar;
  49. float beat_type;
  50. double ticks_per_beat;
  51. double beats_per_minute;
  52. double frame_time;
  53. double next_time;
  54. jack_nframes_t bbt_offset;
  55. float audio_frames_per_video_frame;
  56. jack_nframes_t video_offset;
  57. int32_t padding[7];
  58. jack_unique_t unique_2;
  59. } POST_PACKED_STRUCTURE;
  60. typedef struct _jack_client jack_client_t;
  61. typedef struct _jack_position jack_position_t;
  62. jack_transport_state_t jackbridge_transport_query(const jack_client_t*, jack_position_t*);
  63. }
  64. void testcall()
  65. {
  66. const jack_transport_state_t state = jackbridge_transport_query(0, 0);
  67. return; // unused
  68. (void)state;
  69. }