Version 3.0
[rtaudio-cdist.git] / asio / asiolist.h
1 #ifndef __asiolist__\r
2 #define __asiolist__\r
3 \r
4 #define DRVERR                  -5000\r
5 #define DRVERR_INVALID_PARAM            DRVERR-1\r
6 #define DRVERR_DEVICE_ALREADY_OPEN      DRVERR-2\r
7 #define DRVERR_DEVICE_NOT_FOUND         DRVERR-3\r
8 \r
9 #define MAXPATHLEN                      512\r
10 #define MAXDRVNAMELEN           128\r
11 \r
12 struct asiodrvstruct\r
13 {\r
14         int                                             drvID;\r
15         CLSID                                   clsid;\r
16         char                                    dllpath[MAXPATHLEN];\r
17         char                                    drvname[MAXDRVNAMELEN];\r
18         LPVOID                                  asiodrv;\r
19         struct asiodrvstruct    *next;\r
20 };\r
21 \r
22 typedef struct asiodrvstruct ASIODRVSTRUCT;\r
23 typedef ASIODRVSTRUCT   *LPASIODRVSTRUCT;\r
24 \r
25 class AsioDriverList {\r
26 public:\r
27         AsioDriverList();\r
28         ~AsioDriverList();\r
29         \r
30         LONG asioOpenDriver (int,VOID **);\r
31         LONG asioCloseDriver (int);\r
32 \r
33         // nice to have\r
34         LONG asioGetNumDev (VOID);\r
35         LONG asioGetDriverName (int,char *,int);                \r
36         LONG asioGetDriverPath (int,char *,int);\r
37         LONG asioGetDriverCLSID (int,CLSID *);\r
38 \r
39         // or use directly access\r
40         LPASIODRVSTRUCT lpdrvlist;\r
41         int                             numdrv;\r
42 };\r
43 \r
44 typedef class AsioDriverList *LPASIODRIVERLIST;\r
45 \r
46 #endif\r