Changeset 98698 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Feb 22, 2023 11:47:44 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155998
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioDSound.cpp
r98103 r98698 249 249 static int drvHostDSoundStreamStopPlayback(PDRVHOSTDSOUND pThis, PDSOUNDSTREAM pStreamDS, bool fReset); 250 250 251 static int dsoundDevicesEnumerate(PDRVHOSTDSOUND pThis, PDMAUDIOHOSTENUM pDevEnm, uint32_t fEnum);252 253 static void dsoundUpdateStatusInternal(PDRVHOSTDSOUND pThis);254 255 251 256 252 #if defined(LOG_ENABLED) || defined(RTLOG_REL_ENABLED) … … 715 711 LogFlowFunc(("LEAVE %Rhrc\n", hrc)); 716 712 return hrc; 717 }718 719 720 /**721 * Updates this host driver's internal status, according to the global, overall input/output722 * state and all connected (native) audio streams.723 *724 * @todo r=bird: This is a 'ing waste of 'ing time! We're doing this everytime725 * an 'ing stream is created and we doesn't 'ing use the information here726 * for any darn thing! Given the reported slowness of enumeration and727 * issues with the 'ing code the only appropriate response is:728 * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARG!!!!!!!729 *730 * @param pThis Host audio driver instance.731 */732 static void dsoundUpdateStatusInternal(PDRVHOSTDSOUND pThis)733 {734 #if 0 /** @todo r=bird: This isn't doing *ANYTHING* useful. So, I've just disabled it. */735 AssertPtrReturnVoid(pThis);736 LogFlowFuncEnter();737 738 PDMAudioHostEnumDelete(&pThis->DeviceEnum);739 int rc = dsoundDevicesEnumerate(pThis, &pThis->DeviceEnum);740 if (RT_SUCCESS(rc))741 {742 #if 0743 if ( pThis->fEnabledOut != RT_BOOL(cbCtx.cDevOut)744 || pThis->fEnabledIn != RT_BOOL(cbCtx.cDevIn))745 {746 /** @todo Use a registered callback to the audio connector (e.g "OnConfigurationChanged") to747 * let the connector know that something has changed within the host backend. */748 }749 #endif750 pThis->fEnabledIn = PDMAudioHostEnumCountMatching(&pThis->DeviceEnum, PDMAUDIODIR_IN) != 0;751 pThis->fEnabledOut = PDMAudioHostEnumCountMatching(&pThis->DeviceEnum, PDMAUDIODIR_OUT) != 0;752 }753 754 LogFlowFuncLeaveRC(rc);755 #else756 RT_NOREF(pThis);757 #endif758 713 } 759 714 … … 1697 1652 RTListInit(&pStreamDS->ListEntry); /* paranoia */ 1698 1653 1699 /* For whatever reason: */1700 dsoundUpdateStatusInternal(pThis);1701 1702 1654 /* 1703 1655 * DSound has different COM interfaces for working with input and output … … 2378 2330 } 2379 2331 Log4Func(("cbBuf=%#x stream '%s' {%s}\n", cbBuf, pStreamDS->Cfg.szName, drvHostDSoundStreamStatusString(pStreamDS) )); 2380 2381 /** @todo Any condition under which we should call dsoundUpdateStatusInternal(pThis) here?2382 * The old code thought it did so in case of failure, only it couldn't ever fails, so it never did. */2383 2332 2384 2333 /*
Note:
See TracChangeset
for help on using the changeset viewer.