Changeset 54491 in vbox
- Timestamp:
- Feb 25, 2015 1:23:21 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98600
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pdmaudioifs.h
r54368 r54491 568 568 pThis->IHostAudio.pfnInitOut = _aDrvName##InitOut; \ 569 569 pThis->IHostAudio.pfnIsEnabled = _aDrvName##IsEnabled; \ 570 pThis->IHostAudio.pfnPlayOut = _aDrvName##PlayOut; 570 pThis->IHostAudio.pfnPlayOut = _aDrvName##PlayOut; \ 571 pThis->IHostAudio.pfnShutdown = _aDrvName##Shutdown; 571 572 572 573 /** Pointer to a host audio interface. */ … … 584 585 */ 585 586 DECLR3CALLBACKMEMBER(int, pfnInit, (PPDMIHOSTAUDIO pInterface)); 587 588 /** 589 * Shuts down the host-specific audio device. 590 * 591 * @returns VBox status code. 592 * @param pInterface Pointer to the interface structure containing the called function pointer. 593 */ 594 DECLR3CALLBACKMEMBER(void, pfnShutdown, (PPDMIHOSTAUDIO pInterface)); 595 586 596 /** 587 597 * Initialize the host-specific audio device for input stream. -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r54428 r54491 1268 1268 } 1269 1269 1270 static void drvAudioExit(PPDMDRVINS pDrvIns)1271 {1272 LogFlowFuncEnter();1273 1274 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO);1275 1276 /* Tear down all host output streams. */1277 PPDMAUDIOHSTSTRMOUT pHstStrmOut = NULL;1278 while ((pHstStrmOut = drvAudioFindAnyHstOut(pThis, pHstStrmOut)))1279 {1280 pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE);1281 pThis->pHostDrvAudio->pfnFiniOut(pThis->pHostDrvAudio, pHstStrmOut);1282 }1283 1284 /* Tear down all host input streams. */1285 PPDMAUDIOHSTSTRMIN pHstStrmIn = NULL;1286 while ((pHstStrmIn = drvAudioFindNextHstIn(pThis, pHstStrmIn)))1287 {1288 pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_DISABLE);1289 pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio, pHstStrmIn);1290 }1291 }1292 1293 1270 static struct audio_option audio_options[] = 1294 1271 { … … 1817 1794 PDMDRV_CHECK_VERSIONS_RETURN_VOID(pDrvIns); 1818 1795 1819 drvAudioExit(pDrvIns); 1796 PDRVAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVAUDIO); 1797 1798 /* Tear down all host output streams. */ 1799 PPDMAUDIOHSTSTRMOUT pHstStrmOut = NULL; 1800 while ((pHstStrmOut = drvAudioFindAnyHstOut(pThis, pHstStrmOut))) 1801 { 1802 pThis->pHostDrvAudio->pfnControlOut(pThis->pHostDrvAudio, pHstStrmOut, PDMAUDIOSTREAMCMD_DISABLE); 1803 pThis->pHostDrvAudio->pfnFiniOut(pThis->pHostDrvAudio, pHstStrmOut); 1804 } 1805 1806 /* Tear down all host input streams. */ 1807 PPDMAUDIOHSTSTRMIN pHstStrmIn = NULL; 1808 while ((pHstStrmIn = drvAudioFindNextHstIn(pThis, pHstStrmIn))) 1809 { 1810 pThis->pHostDrvAudio->pfnControlIn(pThis->pHostDrvAudio, pHstStrmIn, PDMAUDIOSTREAMCMD_DISABLE); 1811 pThis->pHostDrvAudio->pfnFiniIn(pThis->pHostDrvAudio, pHstStrmIn); 1812 } 1813 1814 if (pThis->pHostDrvAudio->pfnShutdown) 1815 pThis->pHostDrvAudio->pfnShutdown(pThis->pHostDrvAudio); 1816 1817 LogFlowFuncLeave(); 1820 1818 } 1821 1819 -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r54433 r54491 1273 1273 } 1274 1274 1275 static DECLCALLBACK(void) drvHostALSAAudioShutdown(PPDMIHOSTAUDIO pInterface) 1276 { 1277 NOREF(pInterface); 1278 } 1279 1275 1280 /** 1276 1281 * @interface_method_impl{PDMIBASE,pfnQueryInterface} … … 1284 1289 1285 1290 return NULL; 1286 }1287 1288 static DECLCALLBACK(void) drvHostAlsaAudioDestruct(PPDMDRVINS pDrvIns)1289 {1290 1291 } 1291 1292 … … 1338 1339 drvHostAlsaAudioConstruct, 1339 1340 /* pfnDestruct */ 1340 drvHostAlsaAudioDestruct,1341 NULL, 1341 1342 /* pfnRelocate */ 1342 1343 NULL, -
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r54433 r54491 1925 1925 } 1926 1926 1927 static DECLCALLBACK(void) drvHostCoreAudioShutdown(PPDMIHOSTAUDIO pInterface) 1928 { 1929 NOREF(pInterface); 1930 } 1931 1927 1932 static DECLCALLBACK(void *) drvHostCoreAudioQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1928 1933 { … … 1933 1938 1934 1939 return NULL; 1935 }1936 1937 static DECLCALLBACK(void) drvHostCoreAudioDestruct(PPDMDRVINS pDrvIns)1938 {1939 1940 } 1940 1941 … … 1986 1987 drvHostCoreAudioConstruct, 1987 1988 /* pfnDestruct */ 1988 drvHostCoreAudioDestruct,1989 NULL, 1989 1990 /* pfnRelocate */ 1990 1991 NULL, -
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r54433 r54491 1509 1509 } 1510 1510 1511 static DECLCALLBACK(void) drvHostDSoundShutdown(PPDMIHOSTAUDIO pInterface) 1512 { 1513 NOREF(pInterface); 1514 } 1515 1511 1516 static DECLCALLBACK(int) drvHostDSoundInit(PPDMIHOSTAUDIO pInterface) 1512 1517 { … … 1530 1535 } 1531 1536 1532 1533 /*1534 * PDMIBASE1535 */1536 1537 1537 static DECLCALLBACK(void *) drvHostDSoundQueryInterface(PPDMIBASE pInterface, const char *pszIID) 1538 1538 { … … 1544 1544 return NULL; 1545 1545 } 1546 1547 1548 /*1549 * PDM driver.1550 */1551 1546 1552 1547 static int dsoundConfigQueryStringAlloc(PCFGMNODE pNode, const char *pszName, char **ppszString) -
trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
r54433 r54491 207 207 } 208 208 209 static DECLCALLBACK(void) drvHostNullAudio Destruct(PPDMDRVINS pDrvIns)210 { 211 NOREF(p DrvIns);209 static DECLCALLBACK(void) drvHostNullAudioShutdown(PPDMIHOSTAUDIO pInterface) 210 { 211 NOREF(pInterface); 212 212 } 213 213 … … 219 219 static DECLCALLBACK(int) drvHostNullAudioConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfg, uint32_t fFlags) 220 220 { 221 AssertPtrReturn(pDrvIns, VERR_INVALID_POINTER); 222 /* pCfg is optional. */ 223 221 224 PDRVHOSTNULLAUDIO pThis = PDMINS_2_DATA(pDrvIns, PDRVHOSTNULLAUDIO); 222 225 LogRel(("Audio: Initializing NULL driver\n")); … … 260 263 drvHostNullAudioConstruct, 261 264 /* pfnDestruct */ 262 drvHostNullAudioDestruct,265 NULL, 263 266 /* pfnRelocate */ 264 267 NULL, -
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r54433 r54491 906 906 } 907 907 908 static DECLCALLBACK(void) drvHostOSSAudioShutdown(PPDMIHOSTAUDIO pInterface) 909 { 910 NOREF(pInterface); 911 } 912 908 913 /** 909 914 * @interface_method_impl{PDMIBASE,pfnQueryInterface} … … 917 922 918 923 return NULL; 919 }920 921 static DECLCALLBACK(void) drvHostOSSAudioDestruct(PPDMDRVINS pDrvIns)922 {923 924 } 924 925 … … 971 972 drvHostOSSAudioConstruct, 972 973 /* pfnDestruct */ 973 drvHostOSSAudioDestruct,974 NULL, 974 975 /* pfnRelocate */ 975 976 NULL, -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r54433 r54491 1071 1071 } 1072 1072 1073 static DECLCALLBACK(void) drvHostPulseAudioShutdown(PPDMIHOSTAUDIO pInterface) 1074 { 1075 NOREF(pInterface); 1076 1077 LogFlowFuncEnter(); 1078 1079 if (g_pMainLoop) 1080 pa_threaded_mainloop_stop(g_pMainLoop); 1081 1082 if (g_pContext) 1083 { 1084 pa_context_disconnect(g_pContext); 1085 pa_context_unref(g_pContext); 1086 g_pContext = NULL; 1087 } 1088 1089 if (g_pMainLoop) 1090 { 1091 pa_threaded_mainloop_free(g_pMainLoop); 1092 g_pMainLoop = NULL; 1093 } 1094 1095 LogFlowFuncLeave(); 1096 } 1097 1073 1098 /** 1074 1099 * @interface_method_impl{PDMIBASE,pfnQueryInterface} … … 1087 1112 } 1088 1113 1089 static DECLCALLBACK(void) drvHostPulseAudioDestruct(PPDMDRVINS pDrvIns)1090 {1091 NOREF(pDrvIns);1092 1093 LogFlowFuncEnter();1094 1095 if (g_pMainLoop)1096 pa_threaded_mainloop_stop(g_pMainLoop);1097 1098 if (g_pContext)1099 {1100 pa_context_disconnect(g_pContext);1101 pa_context_unref(g_pContext);1102 g_pContext = NULL;1103 }1104 1105 if (g_pMainLoop)1106 {1107 pa_threaded_mainloop_free(g_pMainLoop);1108 g_pMainLoop = NULL;1109 }1110 1111 LogFlowFuncLeave();1112 }1113 1114 1114 /** 1115 * Construct a DirectSoundAudio driver instance.1115 * Constructs a PulseAudio Audio driver instance. 1116 1116 * 1117 1117 * @copydoc FNPDMDRVCONSTRUCT … … 1132 1132 1133 1133 return VINF_SUCCESS; 1134 } 1135 1136 /** 1137 * Destructs a PulseAudio Audio driver instance. 1138 * 1139 * @copydoc FNPDMDRVCONSTRUCT 1140 */ 1141 static DECLCALLBACK(void) drvHostPulseAudioDestruct(PPDMDRVINS pDrvIns) 1142 { 1143 NOREF(pDrvIns); 1144 LogFlowFuncEnter(); 1134 1145 } 1135 1146 -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r54368 r54491 356 356 357 357 return VINF_SUCCESS; 358 } 359 360 static DECLCALLBACK(void) drvAudioVRDEShutdown(PPDMIHOSTAUDIO pInterface) 361 { 362 PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio); 363 AssertPtrReturn(pDrv, VERR_INVALID_POINTER); 364 365 if (pDrv->pConsoleVRDPServer) 366 pDrv->pConsoleVRDPServer->SendAudioInputEnd(NULL); 358 367 } 359 368 -
trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
r54368 r54491 627 627 628 628 return VINF_SUCCESS; 629 } 630 631 static DECLCALLBACK(void) drvAudioVideoRecShutdown(PPDMIHOSTAUDIO pInterface) 632 { 633 NOREF(pInterface); 629 634 } 630 635
Note:
See TracChangeset
for help on using the changeset viewer.