check for alsa-lib 1.0.18, now required
[jack.git] / jack / driver_interface.h
blob1112ac92441cb06735c3a24f3e57735b4055db05
1 /*
2 Copyright (C) 2003 Bob Ham <rah@bash.sh>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #ifndef __jack_driver_interface_h__
21 #define __jack_driver_interface_h__
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 #include <limits.h>
29 #include <jack/jack.h>
30 #include <jack/internal.h>
32 #define JACK_DRIVER_NAME_MAX 15
33 #define JACK_DRIVER_PARAM_NAME_MAX 15
34 #define JACK_DRIVER_PARAM_STRING_MAX 63
37 /** Driver parameter types */
38 typedef enum
40 JackDriverParamInt = 1,
41 JackDriverParamUInt,
42 JackDriverParamChar,
43 JackDriverParamString,
44 JackDriverParamBool
46 } jack_driver_param_type_t;
48 /** Driver parameter value */
49 typedef union
51 uint32_t ui;
52 int32_t i;
53 char c;
54 char str[JACK_DRIVER_PARAM_STRING_MAX+1];
55 } jack_driver_param_value_t;
58 /** A driver parameter descriptor */
59 typedef struct
61 char name[JACK_DRIVER_NAME_MAX+1]; /**< The parameter's name */
62 char character; /**< The parameter's character (for getopt, etc) */
63 jack_driver_param_type_t type; /**< The parameter's type */
64 jack_driver_param_value_t value; /**< The parameter's (default) value */
65 char short_desc[64]; /**< A short (~30 chars) description for the user */
66 char long_desc[1024]; /**< A longer description for the user */
68 } jack_driver_param_desc_t;
70 /** A driver parameter */
71 typedef struct
73 char character;
74 jack_driver_param_value_t value;
75 } jack_driver_param_t;
78 /** A struct for describing a jack driver */
79 typedef struct
81 char name[JACK_DRIVER_NAME_MAX+1]; /**< The driver's canonical name */
82 char file[PATH_MAX+1]; /**< The filename of the driver's shared object file */
83 uint32_t nparams; /**< The number of parameters the driver has */
84 jack_driver_param_desc_t * params; /**< An array of parameter descriptors */
86 } jack_driver_desc_t;
91 #ifdef __cplusplus
93 #endif
95 #endif /* __jack_driver_interface_h__ */