jack1 codebase
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.

99 lines
2.7KB

  1. #ifndef __jack_libjack_local_h__
  2. #define __jack_libjack_local_h__
  3. /* Client data structure, in the client address space. */
  4. struct _jack_client {
  5. jack_control_t *engine;
  6. jack_client_control_t *control;
  7. jack_shm_info_t engine_shm;
  8. jack_shm_info_t control_shm;
  9. struct pollfd* pollfd;
  10. int pollmax;
  11. int graph_next_fd;
  12. int request_fd;
  13. int upstream_is_jackd;
  14. /* these two are copied from the engine when the
  15. * client is created.
  16. */
  17. jack_port_type_id_t n_port_types;
  18. jack_shm_info_t* port_segment;
  19. JSList *ports;
  20. JSList *ports_ext;
  21. pthread_t thread;
  22. char fifo_prefix[PATH_MAX+1];
  23. void (*on_shutdown)(void *arg);
  24. void *on_shutdown_arg;
  25. void (*on_info_shutdown)(jack_status_t, const char*, void *arg);
  26. void *on_info_shutdown_arg;
  27. char thread_ok : 1;
  28. char first_active : 1;
  29. pthread_t thread_id;
  30. char name[JACK_CLIENT_NAME_SIZE];
  31. int session_cb_immediate_reply;
  32. #ifdef JACK_USE_MACH_THREADS
  33. /* specific ressources for server/client real-time thread communication */
  34. mach_port_t clienttask, bp, serverport, replyport;
  35. trivial_message message;
  36. pthread_t process_thread;
  37. char rt_thread_ok : 1;
  38. #endif
  39. /* callbacks
  40. */
  41. JackProcessCallback process;
  42. void *process_arg;
  43. JackThreadInitCallback thread_init;
  44. void *thread_init_arg;
  45. JackBufferSizeCallback bufsize;
  46. void *bufsize_arg;
  47. JackSampleRateCallback srate;
  48. void *srate_arg;
  49. JackPortRegistrationCallback port_register;
  50. void *port_register_arg;
  51. JackPortConnectCallback port_connect;
  52. void *port_connect_arg;
  53. JackGraphOrderCallback graph_order;
  54. void *graph_order_arg;
  55. JackXRunCallback xrun;
  56. void *xrun_arg;
  57. JackSyncCallback sync_cb;
  58. void *sync_arg;
  59. JackTimebaseCallback timebase_cb;
  60. void *timebase_arg;
  61. JackFreewheelCallback freewheel_cb;
  62. void *freewheel_arg;
  63. JackClientRegistrationCallback client_register;
  64. void *client_register_arg;
  65. JackThreadCallback thread_cb;
  66. void *thread_cb_arg;
  67. JackSessionCallback session_cb;
  68. void *session_cb_arg;
  69. JackLatencyCallback latency_cb;
  70. void *latency_cb_arg;
  71. /* external clients: set by libjack
  72. * internal clients: set by engine */
  73. int (*deliver_request)(void*, jack_request_t*); /* JOQ: 64/32 bug! */
  74. void *deliver_arg;
  75. };
  76. extern int jack_client_deliver_request (const jack_client_t *client,
  77. jack_request_t *req);
  78. extern jack_port_t *jack_port_new (const jack_client_t *client,
  79. jack_port_id_t port_id,
  80. jack_control_t *control);
  81. extern void *jack_zero_filled_buffer;
  82. extern void jack_set_clock_source (jack_timer_type_t);
  83. #endif /* __jack_libjack_local_h__ */