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.

98 lines
2.6KB

  1. /*
  2. Copyright (C) 2003 Bob 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 Lesser General Public License as published by
  5. the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program; if not, write to the Free Software
  13. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  14. */
  15. #ifndef __jack_driver_interface_h__
  16. #define __jack_driver_interface_h__
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #include <limits.h>
  21. #include <jack/jack.h>
  22. #include <jack/internal.h>
  23. #define JACK_DRIVER_NAME_MAX 15
  24. #define JACK_DRIVER_PARAM_NAME_MAX 15
  25. #define JACK_DRIVER_PARAM_STRING_MAX 63
  26. /** Driver parameter types */
  27. typedef enum
  28. {
  29. JackDriverParamInt = 1,
  30. JackDriverParamUInt,
  31. JackDriverParamChar,
  32. JackDriverParamString,
  33. JackDriverParamBool
  34. } jack_driver_param_type_t;
  35. /** Driver parameter value */
  36. typedef union
  37. {
  38. uint32_t ui;
  39. int32_t i;
  40. char c;
  41. char str[JACK_DRIVER_PARAM_STRING_MAX+1];
  42. } jack_driver_param_value_t;
  43. /** A driver parameter descriptor */
  44. typedef struct
  45. {
  46. char name[JACK_DRIVER_NAME_MAX+1]; /**< The parameter's name */
  47. char character; /**< The parameter's character (for getopt, etc) */
  48. jack_driver_param_type_t type; /**< The parameter's type */
  49. jack_driver_param_value_t value; /**< The parameter's (default) value */
  50. char short_desc[64]; /**< A short (~30 chars) description for the user */
  51. char long_desc[1024]; /**< A longer description for the user */
  52. } jack_driver_param_desc_t;
  53. /** A driver parameter */
  54. typedef struct
  55. {
  56. char character;
  57. jack_driver_param_value_t value;
  58. } jack_driver_param_t;
  59. /** A struct for describing a jack driver */
  60. typedef struct
  61. {
  62. char name[JACK_DRIVER_NAME_MAX+1]; /**< The driver's canonical name */
  63. char file[PATH_MAX+1]; /**< The filename of the driver's shared object file */
  64. uint32_t nparams; /**< The number of parameters the driver has */
  65. jack_driver_param_desc_t * params; /**< An array of parameter descriptors */
  66. } jack_driver_desc_t;
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70. #endif /* __jack_driver_interface_h__ */