Changeset 82255 in vbox for trunk/include/VBox/vmm
- Timestamp:
- Nov 27, 2019 11:20:26 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 135073
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r82254 r82255 1 1 /** @file 2 * PDM - Pluggable Device Manager, audio interfaces.2 * PDM - Pluggable Device Manager, Audio interfaces. 3 3 */ 4 4 … … 68 68 * just created audio mixer sink will do the job. 69 69 * 70 * Note: The AUDIOMIXER API is purely optional and is not used by all currently implemented71 * device emulations (e.g. SB16).70 * @note The AUDIOMIXER API is purely optional and is not used by all currently 71 * implemented device emulations (e.g. SB16). 72 72 * 73 73 * … … 636 636 { a_cBytes, a_cCannels, a_cShift, a_fSigned, a_fSwapEndian, a_uHz } 637 637 /** Calculates the cShift value of given sample bits and audio channels. 638 * Note:Does only support mono/stereo channels for now. */638 * @note Does only support mono/stereo channels for now. */ 639 639 #define PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(cBytes, cChannels) ((cChannels == 2) + (cBytes / 2)) 640 640 /** Calculates the cShift value of a PDMAUDIOPCMPROPS structure. */ … … 802 802 typedef struct PDMAUDIOSTREAMRATE 803 803 { 804 /** Current (absolute) offset in the output 805 * (destination) stream. */ 806 uint64_t dstOffset; 807 /** Increment for moving dstOffset for the 808 * destination stream. This is needed because the 809 * source <-> destination rate might be different. */ 810 uint64_t dstInc; 811 /** Current (absolute) offset in the input 812 * stream. */ 813 uint32_t srcOffset; 804 /** Current (absolute) offset in the output (destination) stream. 805 * @todo r=bird: Please reveal which unit these members are given in. */ 806 uint64_t offDst; 807 /** Increment for moving offDst for the destination stream. 808 * This is needed because the source <-> destination rate might be different. */ 809 uint64_t uDstInc; 810 /** Current (absolute) offset in the input stream. */ 811 uint32_t offSrc; 814 812 /** Explicit alignment padding. */ 815 813 uint32_t u32AlignmentPadding; 816 814 /** Last processed frame of the input stream. 817 815 * Needed for interpolation. */ 818 PDMAUDIOFRAME srcFrameLast;816 PDMAUDIOFRAME SrcFrameLast; 819 817 } PDMAUDIOSTREAMRATE; 820 818 /** Pointer to rate processing information of a stream. */ … … 847 845 { 848 846 /** Number of audio frames to convert. */ 849 uint32_t 847 uint32_t cFrames; 850 848 union 851 849 { … … 863 861 864 862 /** 865 * Note:All internal handling is done in audio frames, not in bytes!863 * @note All internal handling is done in audio frames, not in bytes! 866 864 * @todo r=bird: What does this node actually apply to? 867 865 */ … … 877 875 * @param cbSrc Number of bytes to convert. 878 876 * @param pOpts Conversion options. 877 * @todo r=bird: The @a paDst size is presumable given in @a pOpts->cFrames? 879 878 */ 880 879 typedef DECLCALLBACK(uint32_t) FNPDMAUDIOMIXBUFCONVFROM(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc, … … 889 888 * @param paSrc The input frames. 890 889 * @param pOpts Conversion options. 890 * @todo r=bird: The @a paSrc size is presumable given in @a pOpts->cFrames and 891 * this implicitly gives the pvDst size too, right? 891 892 */ 892 893 typedef DECLCALLBACK(void) FNPDMAUDIOMIXBUFCONVTO(void *pvDst, PCPDMAUDIOFRAME paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts); … … 914 915 uint32_t offWrite; 915 916 /** 916 * Total frames already mixed down to the parent buffer (if any). Always starting at917 * the parent's offRead position.918 * 919 * Note: Count always is specified in parent frames, as the sample count can differ between parent920 * and child.917 * Total frames already mixed down to the parent buffer (if any). 918 * 919 * Always starting at the parent's offRead position. 920 * @note Count always is specified in parent frames, as the sample count can 921 * differ between parent and child. 921 922 */ 922 923 uint32_t cMixed; … … 935 936 /** Internal representation of current volume used for mixing. */ 936 937 PDMAUDMIXBUFVOL Volume; 937 /** This buffer's audio format. */ 938 PDMAUDIOMIXBUFFMT AudioFmt; 939 /** Standard conversion-to function for set AudioFmt. */ 938 /** This buffer's audio format. 939 * @todo r=bird: This seems to be a value created by AUDMIXBUF_AUDIO_FMT_MAKE(), 940 * which is not define here. Does this structure really belong here at 941 * all? */ 942 PDMAUDIOMIXBUFFMT uAudioFmt; 943 /** Standard conversion-to function for set uAudioFmt. */ 940 944 PFNPDMAUDIOMIXBUFCONVTO pfnConvTo; 941 /** Standard conversion-from function for set AudioFmt. */945 /** Standard conversion-from function for set uAudioFmt. */ 942 946 PFNPDMAUDIOMIXBUFCONVFROM pfnConvFrom; 943 947 /** … … 956 960 } PDMAUDIOMIXBUF; 957 961 958 /** @name PDMAUDIOFILE_FLAG _XXX962 /** @name PDMAUDIOFILE_FLAGS_XXX 959 963 * @{ */ 960 typedef uint32_t PDMAUDIOFILEFLAGS;961 964 /** No flags defined. */ 962 #define PDMAUDIOFILE_FLAG _NONE 0965 #define PDMAUDIOFILE_FLAGS_NONE UINT32_C(0) 963 966 /** Keep the audio file even if it contains no audio data. */ 964 #define PDMAUDIOFILE_FLAG _KEEP_IF_EMPTY RT_BIT(0)967 #define PDMAUDIOFILE_FLAGS_KEEP_IF_EMPTY RT_BIT_32(0) 965 968 /** Audio file flag validation mask. */ 966 #define PDMAUDIOFILE_FLAG _VALID_MASK 0x1969 #define PDMAUDIOFILE_FLAGS_VALID_MASK UINT32_C(0x1) 967 970 /** @} */ 968 971 969 /** Audio file default open flags. */ 972 /** Audio file default open flags. 973 * @todo r=bird: What is the exact purpose of this? */ 970 974 #define PDMAUDIOFILE_DEFAULT_OPEN_FLAGS (RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE) 971 975 … … 975 979 typedef enum PDMAUDIOFILETYPE 976 980 { 981 /** The customary invalid zero value. */ 982 PDMAUDIOFILETYPE_INVALID = 0, 977 983 /** Unknown type, do not use. */ 978 PDMAUDIOFILETYPE_UNKNOWN = 0,984 PDMAUDIOFILETYPE_UNKNOWN, 979 985 /** Raw (PCM) file. */ 980 986 PDMAUDIOFILETYPE_RAW, … … 985 991 } PDMAUDIOFILETYPE; 986 992 987 typedef uint32_t PDMAUDIOFILENAMEFLAGS; 988 993 /** @name PDMAUDIOFILENAME_FLAGS_XXX 994 * @{ */ 989 995 /** No flags defined. */ 990 #define PDMAUDIOFILENAME_FLAG _NONE 0996 #define PDMAUDIOFILENAME_FLAGS_NONE UINT32_C(0) 991 997 /** Adds an ISO timestamp to the file name. */ 992 #define PDMAUDIOFILENAME_FLAG_TS RT_BIT(0) 993 994 /** 995 * Structure for an audio file handle. 998 #define PDMAUDIOFILENAME_FLAGS_TS RT_BIT(0) 999 /** @} */ 1000 1001 /** 1002 * Audio file handle. 996 1003 */ 997 1004 typedef struct PDMAUDIOFILE … … 999 1006 /** Type of the audio file. */ 1000 1007 PDMAUDIOFILETYPE enmType; 1001 /** Audio file flags. */ 1002 PDMAUDIOFILEFLAGS fFlags; 1003 /** File name and path. */ 1004 char szName[RTPATH_MAX + 1]; 1008 /** Audio file flags, PDMAUDIOFILE_FLAGS_XXX. */ 1009 uint32_t fFlags; 1005 1010 /** Actual file handle. */ 1006 1011 RTFILE hFile; 1007 1012 /** Data needed for the specific audio file type implemented. 1008 * 1013 * Optional, can be NULL. */ 1009 1014 void *pvData; 1010 1015 /** Data size (in bytes). */ 1011 1016 size_t cbData; 1012 } PDMAUDIOFILE, *PPDMAUDIOFILE; 1013 1014 /** Stream status flag. To be used with PDMAUDIOSTRMSTS_FLAG_ flags. */ 1015 typedef uint32_t PDMAUDIOSTREAMSTS; 1016 1017 /** File name and path. */ 1018 char szName[RTPATH_MAX]; 1019 } PDMAUDIOFILE; 1020 /** Pointer to an audio file handle. */ 1021 typedef PDMAUDIOFILE *PPDMAUDIOFILE; 1022 1023 /** @name PDMAUDIOSTREAMSTS_FLAGS_XXX 1024 * @{ */ 1017 1025 /** No flags being set. */ 1018 #define PDMAUDIOSTREAMSTS_FLAG _NONE 01026 #define PDMAUDIOSTREAMSTS_FLAGS_NONE UINT32_C(0) 1019 1027 /** Whether this stream has been initialized by the 1020 1028 * backend or not. */ 1021 #define PDMAUDIOSTREAMSTS_FLAG _INITIALIZED RT_BIT_32(0)1029 #define PDMAUDIOSTREAMSTS_FLAGS_INITIALIZED RT_BIT_32(0) 1022 1030 /** Whether this stream is enabled or disabled. */ 1023 #define PDMAUDIOSTREAMSTS_FLAG _ENABLED RT_BIT_32(1)1031 #define PDMAUDIOSTREAMSTS_FLAGS_ENABLED RT_BIT_32(1) 1024 1032 /** Whether this stream has been paused or not. This also implies 1025 1033 * that this is an enabled stream! */ 1026 #define PDMAUDIOSTREAMSTS_FLAG _PAUSED RT_BIT_32(2)1034 #define PDMAUDIOSTREAMSTS_FLAGS_PAUSED RT_BIT_32(2) 1027 1035 /** Whether this stream was marked as being disabled 1028 1036 * but there are still associated guest output streams 1029 1037 * which rely on its data. */ 1030 #define PDMAUDIOSTREAMSTS_FLAG _PENDING_DISABLE RT_BIT_32(3)1038 #define PDMAUDIOSTREAMSTS_FLAGS_PENDING_DISABLE RT_BIT_32(3) 1031 1039 /** Whether this stream is in re-initialization phase. 1032 1040 * All other bits remain untouched to be able to restore 1033 1041 * the stream's state after the re-initialization bas been 1034 1042 * finished. */ 1035 #define PDMAUDIOSTREAMSTS_FLAG _PENDING_REINIT RT_BIT_32(4)1043 #define PDMAUDIOSTREAMSTS_FLAGS_PENDING_REINIT RT_BIT_32(4) 1036 1044 /** Validation mask. */ 1037 #define PDMAUDIOSTREAMSTS_VALID_MASK UINT32_C(0x0000001F) 1038 1039 /** 1040 * Enumeration presenting a backend's current status. 1045 #define PDMAUDIOSTREAMSTS_VALID_MASK UINT32_C(0x0000001F) 1046 /** Stream status flag, PDMAUDIOSTREAMSTS_FLAGS_XXX. */ 1047 typedef uint32_t PDMAUDIOSTREAMSTS; 1048 /** @} */ 1049 1050 /** 1051 * Backend status. 1041 1052 */ 1042 1053 typedef enum PDMAUDIOBACKENDSTS … … 1061 1072 1062 1073 /** 1063 * Structure for keeping audio input stream specifics. 1064 * Do not use directly. Instead, use PDMAUDIOSTREAM. 1074 * The specifics for an audio input stream. 1075 * 1076 * Do not use directly, use PDMAUDIOSTREAM instead. 1065 1077 */ 1066 1078 typedef struct PDMAUDIOSTREAMIN … … 1069 1081 struct 1070 1082 { 1071 STAMCOUNTER TotalFramesCaptured;1072 STAMCOUNTER AvgFramesCaptured;1073 STAMCOUNTER TotalTimesCaptured;1074 STAMCOUNTER TotalFramesRead;1075 STAMCOUNTER AvgFramesRead;1076 STAMCOUNTER TotalTimesRead;1083 STAMCOUNTER TotalFramesCaptured; 1084 STAMCOUNTER AvgFramesCaptured; 1085 STAMCOUNTER TotalTimesCaptured; 1086 STAMCOUNTER TotalFramesRead; 1087 STAMCOUNTER AvgFramesRead; 1088 STAMCOUNTER TotalTimesRead; 1077 1089 } Stats; 1078 1090 #endif … … 1080 1092 { 1081 1093 /** File for writing stream reads. */ 1082 PPDMAUDIOFILE 1094 PPDMAUDIOFILE pFileStreamRead; 1083 1095 /** File for writing non-interleaved captures. */ 1084 PPDMAUDIOFILE 1096 PPDMAUDIOFILE pFileCaptureNonInterleaved; 1085 1097 } Dbg; 1086 } PDMAUDIOSTREAMIN, *PPDMAUDIOSTREAMIN; 1087 1088 /** 1089 * Structure for keeping audio output stream specifics. 1090 * Do not use directly. Instead, use PDMAUDIOSTREAM. 1098 } PDMAUDIOSTREAMIN; 1099 /** Pointer to the specifics for an audio input stream. */ 1100 typedef PDMAUDIOSTREAMIN *PPDMAUDIOSTREAMIN; 1101 1102 /** 1103 * The specifics for an audio output stream. 1104 * 1105 * Do not use directly, use PDMAUDIOSTREAM instead. 1091 1106 */ 1092 1107 typedef struct PDMAUDIOSTREAMOUT … … 1095 1110 struct 1096 1111 { 1097 STAMCOUNTER TotalFramesPlayed;1098 STAMCOUNTER AvgFramesPlayed;1099 STAMCOUNTER TotalTimesPlayed;1100 STAMCOUNTER TotalFramesWritten;1101 STAMCOUNTER AvgFramesWritten;1102 STAMCOUNTER TotalTimesWritten;1112 STAMCOUNTER TotalFramesPlayed; 1113 STAMCOUNTER AvgFramesPlayed; 1114 STAMCOUNTER TotalTimesPlayed; 1115 STAMCOUNTER TotalFramesWritten; 1116 STAMCOUNTER AvgFramesWritten; 1117 STAMCOUNTER TotalTimesWritten; 1103 1118 } Stats; 1104 1119 #endif … … 1106 1121 { 1107 1122 /** File for writing stream writes. */ 1108 PPDMAUDIOFILE 1123 PPDMAUDIOFILE pFileStreamWrite; 1109 1124 /** File for writing stream playback. */ 1110 PPDMAUDIOFILE 1125 PPDMAUDIOFILE pFilePlayNonInterleaved; 1111 1126 } Dbg; 1112 } PDMAUDIOSTREAMOUT, *PPDMAUDIOSTREAMOUT; 1127 } PDMAUDIOSTREAMOUT; 1128 /** Pointer to the specifics for an audio output stream. */ 1129 typedef PDMAUDIOSTREAMOUT *PPDMAUDIOSTREAMOUT; 1113 1130 1114 1131 /** Pointer to an audio stream. */ … … 1122 1139 { 1123 1140 /** The stream's audio configuration. */ 1124 PDMAUDIOSTREAMCFG 1141 PDMAUDIOSTREAMCFG Cfg; 1125 1142 /** This stream's mixing buffer. */ 1126 PDMAUDIOMIXBUF 1143 PDMAUDIOMIXBUF MixBuf; 1127 1144 } PDMAUDIOSTREAMCTX; 1128 1145 … … 1136 1153 { 1137 1154 /** List node. */ 1138 RTLISTNODE Node;1155 RTLISTNODE Node; 1139 1156 /** Name of this stream. */ 1140 char szName[64];1141 /** Number of references to this stream. Only can be1142 * destroyed if the reference count is reaching0. */1143 uint32_t cRefs;1157 char szName[64]; 1158 /** Number of references to this stream. 1159 * Only can be destroyed when the reference count reaches 0. */ 1160 uint32_t cRefs; 1144 1161 /** Stream status flag. */ 1145 PDMAUDIOSTREAMSTS fStatus;1162 PDMAUDIOSTREAMSTS fStatus; 1146 1163 /** Audio direction of this stream. */ 1147 PDMAUDIODIR enmDir; 1148 /** The guest side of the stream. */ 1149 PDMAUDIOSTREAMCTX Guest; 1150 /** The host side of the stream. */ 1151 PDMAUDIOSTREAMCTX Host; 1152 /** Union for input/output specifics (based on enmDir). */ 1153 union 1154 { 1155 PDMAUDIOSTREAMIN In; 1156 PDMAUDIOSTREAMOUT Out; 1157 } RT_UNION_NM(u); 1158 /** Timestamp (in ns) since last iteration. */ 1159 uint64_t tsLastIteratedNs; 1160 /** Timestamp (in ns) since last playback / capture. */ 1161 uint64_t tsLastPlayedCapturedNs; 1162 /** Timestamp (in ns) since last read (input streams) or 1163 * write (output streams). */ 1164 uint64_t tsLastReadWrittenNs; 1164 PDMAUDIODIR enmDir; 1165 1165 /** For output streams this indicates whether the stream has reached 1166 1166 * its playback threshold, e.g. is playing audio. 1167 1167 * For input streams this indicates whether the stream has enough input 1168 1168 * data to actually start reading audio. */ 1169 bool fThresholdReached; 1169 bool fThresholdReached; 1170 bool afPadding[3]; 1171 /** The guest side of the stream. */ 1172 PDMAUDIOSTREAMCTX Guest; 1173 /** The host side of the stream. */ 1174 PDMAUDIOSTREAMCTX Host; 1175 /** Union for input/output specifics depending on enmDir. */ 1176 union 1177 { 1178 PDMAUDIOSTREAMIN In; 1179 PDMAUDIOSTREAMOUT Out; 1180 } RT_UNION_NM(u); 1181 /** Timestamp (in ns) since last iteration. */ 1182 uint64_t tsLastIteratedNs; 1183 /** Timestamp (in ns) since last playback / capture. */ 1184 uint64_t tsLastPlayedCapturedNs; 1185 /** Timestamp (in ns) since last read (input streams) or 1186 * write (output streams). */ 1187 uint64_t tsLastReadWrittenNs; 1170 1188 /** Data to backend-specific stream data. 1171 1189 * This data block will be casted by the backend to access its backend-dependent data. 1172 1190 * 1173 1191 * That way the backends do not have access to the audio connector's data. */ 1174 void *pvBackend;1192 void *pvBackend; 1175 1193 /** Size (in bytes) of the backend-specific stream data. */ 1176 size_t cbBackend;1194 size_t cbBackend; 1177 1195 } PDMAUDIOSTREAM; 1178 1196 1179 /** Pointer to a audio connector interface. */1180 typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR;1181 1197 1182 1198 /** … … 1188 1204 PDMAUDIOCBSOURCE_INVALID = 0, 1189 1205 /** Device emulation. */ 1190 PDMAUDIOCBSOURCE_DEVICE = 1,1206 PDMAUDIOCBSOURCE_DEVICE, 1191 1207 /** Audio connector interface. */ 1192 PDMAUDIOCBSOURCE_CONNECTOR = 2,1208 PDMAUDIOCBSOURCE_CONNECTOR, 1193 1209 /** Backend (lower). */ 1194 PDMAUDIOCBSOURCE_BACKEND = 3,1210 PDMAUDIOCBSOURCE_BACKEND, 1195 1211 /** Hack to blow the type up to 32-bit. */ 1196 1212 PDMAUDIOCBSOURCE_32BIT_HACK = 0x7fffffff … … 1213 1229 } PDMAUDIODEVICECBTYPE; 1214 1230 1231 #if 0 /** @todo r=bird: Who needs this exactly? Fix the style or remove */ 1215 1232 /** 1216 1233 * Device callback data for audio input. … … 1223 1240 /** Output: How many bytes have been read. */ 1224 1241 uint32_t cbOutRead; 1225 } PDMAUDIODEVICECBDATA_DATA_INPUT, *PPDMAUDIODEVICECBDATA_DATA_INPUT; 1242 } PDMAUDIODEVICECBDATA_DATA_INPUT; 1243 typedef PDMAUDIODEVICECBDATA_DATA_INPUT *PPDMAUDIODEVICECBDATA_DATA_INPUT; 1226 1244 1227 1245 /** … … 1235 1253 uint32_t cbOutWritten; 1236 1254 } PDMAUDIODEVICECBDATA_DATA_OUTPUT, *PPDMAUDIODEVICECBDATA_DATA_OUTPUT; 1255 #endif 1237 1256 1238 1257 /** … … 1292 1311 * Must be 0 if pvCtx is NULL. */ 1293 1312 size_t cbCtx; 1294 } PDMAUDIOCBRECORD, *PPDMAUDIOCBRECORD; 1295 1313 } PDMAUDIOCBRECORD; 1314 /** Pointer to an audio callback registration record. */ 1315 typedef PDMAUDIOCBRECORD *PPDMAUDIOCBRECORD; 1316 1317 /** @todo r=bird: What is this exactly? */ 1296 1318 #define PPDMAUDIOBACKENDSTREAM void * 1319 1320 /** Pointer to a audio connector interface. */ 1321 typedef struct PDMIAUDIOCONNECTOR *PPDMIAUDIOCONNECTOR; 1297 1322 1298 1323 /** … … 1346 1371 * 1347 1372 * @returns VBox status code. 1348 * @param pInterface 1349 * @param pCfgHost 1350 * @param pCfgGuest 1351 * @param ppStream 1373 * @param pInterface Pointer to the interface structure containing the called function pointer. 1374 * @param pCfgHost Stream configuration for host side. 1375 * @param pCfgGuest Stream configuration for guest side. 1376 * @param ppStream Pointer where to return the created audio stream on success. 1352 1377 */ 1353 1378 DECLR3CALLBACKMEMBER(int, pfnStreamCreate, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAMCFG pCfgHost, … … 1390 1415 * @param pcbRead Bytes of audio data read. Optional. 1391 1416 */ 1392 DECLR3CALLBACKMEMBER(int, pfnStreamRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)); 1417 DECLR3CALLBACKMEMBER(int, pfnStreamRead, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, 1418 void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)); 1393 1419 1394 1420 /** … … 1402 1428 * @param pcbWritten Bytes of audio data written. Optional. 1403 1429 */ 1404 DECLR3CALLBACKMEMBER(int, pfnStreamWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)); 1430 DECLR3CALLBACKMEMBER(int, pfnStreamWrite, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, 1431 const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)); 1405 1432 1406 1433 /** … … 1412 1439 * @param enmStreamCmd The stream command to issue. 1413 1440 */ 1414 DECLR3CALLBACKMEMBER(int, pfnStreamControl, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, PDMAUDIOSTREAMCMD enmStreamCmd)); 1441 DECLR3CALLBACKMEMBER(int, pfnStreamControl, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, 1442 PDMAUDIOSTREAMCMD enmStreamCmd)); 1415 1443 1416 1444 /** … … 1477 1505 * @param pcFramesCaptured Number of frames captured. Optional. 1478 1506 */ 1479 DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcFramesCaptured)); 1507 DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, 1508 uint32_t *pcFramesCaptured)); 1480 1509 1481 1510 /** … … 1489 1518 * @param cCallbacks Number of callbacks to register. 1490 1519 */ 1491 DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCBRECORD paCallbacks, size_t cCallbacks)); 1520 DECLR3CALLBACKMEMBER(int, pfnRegisterCallbacks, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOCBRECORD paCallbacks, 1521 size_t cCallbacks)); 1492 1522 1493 1523 } PDMIAUDIOCONNECTOR; 1494 1524 1495 1525 /** PDMIAUDIOCONNECTOR interface ID. */ 1496 #define PDMIAUDIOCONNECTOR_IID "A643B40C-733F-4307-9549-070AF0EE0ED6" 1497 1498 /** 1499 * Assigns all needed interface callbacks for an audio backend. 1500 * 1501 * @param a_Prefix The function name prefix. 1502 */ 1503 #define PDMAUDIO_IHOSTAUDIO_CALLBACKS(a_Prefix) \ 1504 do { \ 1505 pThis->IHostAudio.pfnInit = RT_CONCAT(a_Prefix,Init); \ 1506 pThis->IHostAudio.pfnShutdown = RT_CONCAT(a_Prefix,Shutdown); \ 1507 pThis->IHostAudio.pfnGetConfig = RT_CONCAT(a_Prefix,GetConfig); \ 1508 /** @todo Add pfnGetDevices here as soon as supported by all backends. */ \ 1509 pThis->IHostAudio.pfnGetStatus = RT_CONCAT(a_Prefix,GetStatus); \ 1510 /** @todo Ditto for pfnSetCallback. */ \ 1511 pThis->IHostAudio.pfnStreamCreate = RT_CONCAT(a_Prefix,StreamCreate); \ 1512 pThis->IHostAudio.pfnStreamDestroy = RT_CONCAT(a_Prefix,StreamDestroy); \ 1513 pThis->IHostAudio.pfnStreamControl = RT_CONCAT(a_Prefix,StreamControl); \ 1514 pThis->IHostAudio.pfnStreamGetReadable = RT_CONCAT(a_Prefix,StreamGetReadable); \ 1515 pThis->IHostAudio.pfnStreamGetWritable = RT_CONCAT(a_Prefix,StreamGetWritable); \ 1516 pThis->IHostAudio.pfnStreamGetStatus = RT_CONCAT(a_Prefix,StreamGetStatus); \ 1517 pThis->IHostAudio.pfnStreamIterate = RT_CONCAT(a_Prefix,StreamIterate); \ 1518 pThis->IHostAudio.pfnStreamPlay = RT_CONCAT(a_Prefix,StreamPlay); \ 1519 pThis->IHostAudio.pfnStreamCapture = RT_CONCAT(a_Prefix,StreamCapture); \ 1520 } while (0) 1526 #define PDMIAUDIOCONNECTOR_IID "00e704ef-0078-4bb6-0005-a5fd000ded9f" 1527 1521 1528 1522 1529 /** … … 1731 1738 1732 1739 /** PDMIHOSTAUDIO interface ID. */ 1733 #define PDMIHOSTAUDIO_IID " 640F5A31-8245-491C-538F-29A0F9D08881"1740 #define PDMIHOSTAUDIO_IID "007847a0-0075-4964-007d-343f0010f081" 1734 1741 1735 1742 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.