Changeset 88691 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Apr 23, 2021 7:57:31 PM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevHdaStream.cpp
r88690 r88691 2538 2538 * 2539 2539 * This will do the heavy lifting work for us as soon as it's getting notified 2540 * by another thread.}2540 * by the DMA timer callout.} 2541 2541 */ 2542 2542 static DECLCALLBACK(int) hdaR3StreamAsyncIOThread(RTTHREAD hThreadSelf, void *pvUser) -
trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp
r88573 r88691 2697 2697 PDMAudioHostEnumDelete(&pThis->DeviceEnum); 2698 2698 2699 if (pThis->pDrvIns)2700 CoUninitialize();2701 2702 2699 int rc2 = RTCritSectDelete(&pThis->CritSect); 2703 2700 AssertRC(rc2); … … 2783 2780 * Verify that IDirectSound is available. 2784 2781 */ 2785 HRESULT hrc = CoInitializeEx(NULL, COINIT_MULTITHREADED); 2782 LPDIRECTSOUND pDirectSound = NULL; 2783 HRESULT hrc = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_ALL, IID_IDirectSound, (void **)&pDirectSound); 2786 2784 if (SUCCEEDED(hrc)) 2787 { 2788 LPDIRECTSOUND pDirectSound = NULL; 2789 hrc = CoCreateInstance(CLSID_DirectSound, NULL, CLSCTX_ALL, IID_IDirectSound, (void **)&pDirectSound); 2790 if (SUCCEEDED(hrc)) 2791 IDirectSound_Release(pDirectSound); 2792 else 2793 { 2794 LogRel(("DSound: DirectSound not available: %Rhrc\n", hrc)); 2795 return VERR_AUDIO_BACKEND_INIT_FAILED; 2796 } 2797 } 2785 IDirectSound_Release(pDirectSound); 2798 2786 else 2799 2787 { 2800 LogRel(("DSound: CoInitializeEx(,COINIT_MULTITHREADED) failed: %Rhrc\n", hrc));2788 LogRel(("DSound: DirectSound not available: %Rhrc\n", hrc)); 2801 2789 return VERR_AUDIO_BACKEND_INIT_FAILED; 2802 2790 } -
trunk/src/VBox/Devices/Audio/DrvHostAudioWasApi.cpp
r88672 r88691 2290 2290 uint32_t cRefs = pThis->pIEnumerator->Release(); RT_NOREF(cRefs); 2291 2291 LogFlowFunc(("cRefs=%d\n", cRefs)); 2292 CoUninitialize();2293 2292 } 2294 2293 … … 2367 2366 * as well as do enumeration thru. 2368 2367 */ 2369 HRESULT hrc = CoInitializeEx(NULL, COINIT_MULTITHREADED); 2370 AssertLogRelMsgReturn(SUCCEEDED(hrc), ("CoInitializeEx -> %Rhrc\n", hrc), VERR_AUDIO_BACKEND_INIT_FAILED); 2371 2372 hrc = CoCreateInstance(__uuidof(MMDeviceEnumerator), 0, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), 2373 (void **)&pThis->pIEnumerator); 2368 HRESULT hrc = CoCreateInstance(__uuidof(MMDeviceEnumerator), 0, CLSCTX_ALL, __uuidof(IMMDeviceEnumerator), 2369 (void **)&pThis->pIEnumerator); 2374 2370 if (FAILED(hrc)) 2375 2371 { 2376 2372 pThis->pIEnumerator = NULL; 2377 CoUninitialize(); /* uninitialize here so destructor can use pEnumeration as indicator. */2378 2373 LogRel(("WasAPI: Failed to create an MMDeviceEnumerator object: %Rhrc\n", hrc)); 2379 2374 return VERR_AUDIO_BACKEND_INIT_FAILED;
Note:
See TracChangeset
for help on using the changeset viewer.