Changeset 89218 in vbox for trunk/src/VBox/Devices/Audio/DevSB16.cpp
- Timestamp:
- May 21, 2021 11:57:55 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevSB16.cpp
r89213 r89218 1747 1747 * @param pDrv Driver to retrieve driver stream for. 1748 1748 * @param enmDir Stream direction to retrieve. 1749 * @param dstSrcStream destination / source to retrieve.1750 */ 1751 static PSB16DRIVERSTREAM sb16GetDrvStream(PSB16DRIVER pDrv, PDMAUDIODIR enmDir, PDMAUDIO DSTSRCUNION dstSrc)1749 * @param enmPath Stream destination / source to retrieve. 1750 */ 1751 static PSB16DRIVERSTREAM sb16GetDrvStream(PSB16DRIVER pDrv, PDMAUDIODIR enmDir, PDMAUDIOPATH enmPath) 1752 1752 { 1753 1753 PSB16DRIVERSTREAM pDrvStream = NULL; 1754 1754 1755 if (enmDir == PDMAUDIODIR_IN)1756 return NULL; /** @todo Recording not implemented yet. */1757 1758 1755 if (enmDir == PDMAUDIODIR_OUT) 1759 1756 { 1760 LogFunc(("enm Dst=%RU32\n", dstSrc.enmDst));1761 1762 switch ( dstSrc.enmDst)1757 LogFunc(("enmPath=%d\n", enmPath)); 1758 1759 switch (enmPath) 1763 1760 { 1764 case PDMAUDIOP LAYBACKDST_FRONT:1761 case PDMAUDIOPATH_OUT_FRONT: 1765 1762 pDrvStream = &pDrv->Out; 1766 1763 break; … … 1771 1768 } 1772 1769 else 1773 Assert Failed();1770 Assert(enmDir == PDMAUDIODIR_IN /** @todo Recording not implemented yet. */); 1774 1771 1775 1772 return pDrvStream; … … 1800 1797 int rc; 1801 1798 1802 PSB16DRIVERSTREAM pDrvStream = sb16GetDrvStream(pDrv, pStreamCfg->enmDir, pStreamCfg-> u);1799 PSB16DRIVERSTREAM pDrvStream = sb16GetDrvStream(pDrv, pStreamCfg->enmDir, pStreamCfg->enmPath); 1803 1800 if (pDrvStream) 1804 1801 { … … 1868 1865 * @param pMixSink Mixer sink to remove audio streams from. 1869 1866 * @param enmDir Stream direction to remove. 1870 * @param dstSrcStream destination / source to remove.1867 * @param enmPath Stream destination / source to remove. 1871 1868 * @param pDrv Driver stream to remove. 1872 1869 */ 1873 1870 static void sb16RemoveDrvStream(PPDMDEVINS pDevIns, PAUDMIXSINK pMixSink, PDMAUDIODIR enmDir, 1874 PDMAUDIO DSTSRCUNION dstSrc, PSB16DRIVER pDrv)1875 { 1876 PSB16DRIVERSTREAM pDrvStream = sb16GetDrvStream(pDrv, enmDir, dstSrc);1871 PDMAUDIOPATH enmPath, PSB16DRIVER pDrv) 1872 { 1873 PSB16DRIVERSTREAM pDrvStream = sb16GetDrvStream(pDrv, enmDir, enmPath); 1877 1874 if (pDrvStream) 1878 1875 { … … 1896 1893 * @param pMixSink Mixer sink to remove audio streams from. 1897 1894 * @param enmDir Stream direction to remove. 1898 * @param dstSrcStream destination / source to remove.1895 * @param enmPath Stream destination / source to remove. 1899 1896 */ 1900 1897 static void sb16RemoveDrvStreams(PPDMDEVINS pDevIns, PSB16STATE pThis, PAUDMIXSINK pMixSink, 1901 PDMAUDIODIR enmDir, PDMAUDIO DSTSRCUNION dstSrc)1898 PDMAUDIODIR enmDir, PDMAUDIOPATH enmPath) 1902 1899 { 1903 1900 AssertPtrReturnVoid(pMixSink); … … 1906 1903 RTListForEach(&pThis->lstDrv, pDrv, SB16DRIVER, Node) 1907 1904 { 1908 sb16RemoveDrvStream(pDevIns, pMixSink, enmDir, dstSrc, pDrv);1905 sb16RemoveDrvStream(pDevIns, pMixSink, enmDir, enmPath, pDrv); 1909 1906 } 1910 1907 } … … 2209 2206 { 2210 2207 pStream->Cfg.enmDir = PDMAUDIODIR_OUT; 2211 pStream->Cfg. u.enmDst = PDMAUDIOPLAYBACKDST_FRONT;2208 pStream->Cfg.enmPath = PDMAUDIOPATH_OUT_FRONT; 2212 2209 pStream->Cfg.enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED; 2213 2210 … … 2252 2249 AssertReturn(PDMAudioPropsAreValid(&pStream->Cfg.Props), VERR_INVALID_PARAMETER); 2253 2250 2254 PDMAUDIODSTSRCUNION dstSrc;2255 PDMAUDIODIR enmDir;2256 2257 2251 switch (pStream->uIdx) 2258 2252 { 2259 2253 case SB16_IDX_OUT: 2260 {2261 2254 pStream->Cfg.enmDir = PDMAUDIODIR_OUT; 2262 pStream->Cfg. u.enmDst = PDMAUDIOPLAYBACKDST_FRONT;2255 pStream->Cfg.enmPath = PDMAUDIOPATH_OUT_FRONT; 2263 2256 pStream->Cfg.enmLayout = PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED; 2264 2257 2265 2258 RTStrCopy(pStream->Cfg.szName, sizeof(pStream->Cfg.szName), "Output"); 2266 2267 dstSrc.enmDst = PDMAUDIOPLAYBACKDST_FRONT; 2268 enmDir = PDMAUDIODIR_OUT; 2269 break; 2270 } 2259 break; 2271 2260 2272 2261 default: … … 2301 2290 2302 2291 sb16RemoveDrvStreams(pDevIns, pThis, 2303 sb16StreamIndexToSink(pThis, pStream->uIdx), pStream->Cfg.enmDir, pStream->Cfg. u);2292 sb16StreamIndexToSink(pThis, pStream->uIdx), pStream->Cfg.enmDir, pStream->Cfg.enmPath); 2304 2293 2305 2294 rc = sb16AddDrvStreams(pDevIns, pThis, pMixerSink, &pStream->Cfg);
Note:
See TracChangeset
for help on using the changeset viewer.