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.

92 lines
2.3KB

  1. /*
  2. Copyright (C) 2003 Robert Ham <rah@bash.sh>
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  14. */
  15. #ifndef __JACK_NET_DRIVER_H__
  16. #define __JACK_NET_DRIVER_H__
  17. #include <unistd.h>
  18. #include <jack/types.h>
  19. #include <jack/driver.h>
  20. #include <jack/jack.h>
  21. #include <jack/transport.h>
  22. #include <netinet/in.h>
  23. #include <samplerate.h>
  24. typedef struct _net_driver net_driver_t;
  25. struct _net_driver
  26. {
  27. JACK_DRIVER_NT_DECL;
  28. jack_nframes_t net_period_up;
  29. jack_nframes_t net_period_down;
  30. jack_nframes_t sample_rate;
  31. jack_nframes_t bitdepth;
  32. jack_nframes_t period_size;
  33. unsigned int listen_port;
  34. unsigned int capture_channels;
  35. unsigned int playback_channels;
  36. unsigned int capture_channels_audio;
  37. unsigned int playback_channels_audio;
  38. unsigned int capture_channels_midi;
  39. unsigned int playback_channels_midi;
  40. JSList *capture_ports;
  41. JSList *playback_ports;
  42. JSList *playback_srcs;
  43. JSList *capture_srcs;
  44. jack_client_t *client;
  45. int sockfd;
  46. int outsockfd;
  47. struct sockaddr_in syncsource_address;
  48. int reply_port;
  49. int srcaddress_valid;
  50. int sync_state;
  51. unsigned int handle_transport_sync;
  52. unsigned int *rx_buf;
  53. unsigned int *pkt_buf;
  54. unsigned int rx_bufsize;
  55. //unsigned int tx_bufsize;
  56. unsigned int mtu;
  57. unsigned int latency;
  58. jack_nframes_t expected_framecnt;
  59. int expected_framecnt_valid;
  60. unsigned int num_lost_packets;
  61. jack_time_t next_deadline;
  62. int next_deadline_valid;
  63. int packet_data_valid;
  64. int resync_threshold;
  65. int running_free;
  66. };
  67. #endif /* __JACK_NET_DRIVER_H__ */