VirtualBox

source: vbox/trunk/src/VBox/Devices/Audio/VBoxDDVKAT.h@ 88923

Last change on this file since 88923 was 88923, checked in by vboxsync, 4 years ago

Audio/VaKit: Initial commit of VKAT, heavily work in progress. bugref:10008

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1
2
3#ifndef VBoxDDVKAT_h__
4#define VBoxDDVKAT_h__
5
6#include <VBox/vmm/pdmifs.h>
7
8/**
9 * !!! HACK ALERT !!!
10 * This totally ignores *any* IIDs for now!
11 * !!! HACK ALERT !!!
12 */
13
14#ifdef PDMDRV_CHECK_VERSIONS_RETURN_VOID
15# undef PDMDRV_CHECK_VERSIONS_RETURN_VOID
16#endif
17#define PDMDRV_CHECK_VERSIONS_RETURN_VOID(...) do { } while (0)
18
19#ifdef PDMINS_2_DATA
20# undef PDMINS_2_DATA
21#endif
22#define PDMINS_2_DATA(pIns, type) ( (type)(pIns)->pvInstanceData )
23
24#define PDMIBASE_2_PDMDRV(pInterface) ( (PPDMDRVINS)((char *)(pInterface) - RT_UOFFSETOF(PDMDRVINS, IBase)) )
25
26#ifdef PDMDRV_CHECK_VERSIONS_RETURN
27# undef PDMDRV_CHECK_VERSIONS_RETURN
28#endif
29#define PDMDRV_CHECK_VERSIONS_RETURN(pDrvIns) do { } while (0)
30#define PDMDRV_VALIDATE_CONFIG_RETURN(pDrvIns, pszValidValues, pszValidNodes) do { } while (0)
31
32typedef struct PDMDRVINS
33{
34 /** Driver instance number. */
35 uint32_t iInstance;
36 /** Pointer to host audio interface. */
37 PDMIHOSTAUDIO IHostAudio;
38 void *pvInstanceData;
39 PDMIBASE IBase;
40} PDMDRVINS;
41/** Pointer to a PDM Driver Instance. */
42typedef struct PDMDRVINS *PPDMDRVINS;
43
44typedef DECLCALLBACKTYPE(int, FNPDMDRVCONSTRUCT,(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags));
45/** Pointer to a FNPDMDRVCONSTRUCT() function. */
46typedef FNPDMDRVCONSTRUCT *PFNPDMDRVCONSTRUCT;
47
48typedef DECLCALLBACKTYPE(void, FNPDMDRVDESTRUCT,(PPDMDRVINS pDrvIns));
49/** Pointer to a FNPDMDRVDESTRUCT() function. */
50typedef FNPDMDRVDESTRUCT *PFNPDMDRVDESTRUCT;
51
52typedef struct PDMDRVREG
53{
54 /** Size of the instance data. */
55 uint32_t cbInstance;
56 /** Construct instance - required. */
57 PFNPDMDRVCONSTRUCT pfnConstruct;
58 /** Destruct instance - optional. */
59 PFNPDMDRVDESTRUCT pfnDestruct;
60} PDMDRVREG;
61/** Pointer to a PDM Driver Structure. */
62typedef PDMDRVREG *PPDMDRVREG;
63
64DECLINLINE(int) CFGMR3QueryString(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString)
65{
66 RT_NOREF(pNode, pszName, pszString, cchString);
67 return 0;
68}
69
70DECLINLINE(int) CFGMR3QueryStringDef(PCFGMNODE pNode, const char *pszName, char *pszString, size_t cchString, const char *pszDef)
71{
72 RT_NOREF(pNode, pszName, pszString, cchString, pszDef);
73 return 0;
74}
75
76extern const PDMDRVREG g_DrvVKATPulseAudio;
77extern const PDMDRVREG g_DrvVKATAlsa;
78
79#endif /* VBoxDDVKAT_h__ */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette