Changeset 54235 in vbox
- Timestamp:
- Feb 17, 2015 3:08:51 PM (10 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r54230 r54235 260 260 /** Stream for output. */ 261 261 AC97OUTPUTSTREAM Out; 262 /** Number of samples to play (output), needed263 * for the timer routine. */264 uint32_t cSamplesLive;265 262 } AC97DRIVER, *PAC97DRIVER; 266 263 #endif /* VBOX_WITH_PDM_AUDIO_DRIVER */ … … 1289 1286 LogFlowFuncEnter(); 1290 1287 1288 uint32_t cbIn, cbOut, cSamplesLive; 1291 1289 RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node) 1292 1290 { 1293 uint32_t cbIn, cbOut;1294 1291 rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector, 1295 &cbIn, &cbOut, & pDrv->cSamplesLive);1292 &cbIn, &cbOut, &cSamplesLive); 1296 1293 if (RT_SUCCESS(rc)) 1297 1294 { 1298 1295 LogFlowFunc(("\tLUN#%RU8: [1] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut)); 1299 1296 1300 if ( pDrv->cSamplesLive)1297 if (cSamplesLive) 1301 1298 { 1302 1299 uint32_t cSamplesPlayed; 1303 1300 int rc2 = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, &cSamplesPlayed); 1304 1301 if (RT_SUCCESS(rc2)) 1305 {1306 1302 LogFlowFunc(("LUN#%RU8: cSamplesLive=%RU32, cSamplesPlayed=%RU32\n", 1307 pDrv->uLUN, pDrv->cSamplesLive, cSamplesPlayed)); 1308 Assert(pDrv->cSamplesLive >= cSamplesPlayed); 1309 pDrv->cSamplesLive -= cSamplesPlayed; 1310 } 1303 pDrv->uLUN, cSamplesLive, cSamplesPlayed)); 1311 1304 1312 1305 rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector, 1313 &cbIn, &cbOut, & pDrv->cSamplesLive);1306 &cbIn, &cbOut, &cSamplesLive); 1314 1307 if (RT_SUCCESS(rc)) 1315 1308 LogFlowFunc(("\tLUN#%RU8: [2] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut)); … … 1319 1312 cbOutMin = RT_MIN(cbOutMin, cbOut); 1320 1313 } 1321 else1322 pDrv->cSamplesLive = 0;1323 1314 } 1324 1315 -
trunk/src/VBox/Devices/Audio/DevIchHda.cpp
r54234 r54235 605 605 /** Stream for output. */ 606 606 HDAOUTPUTSTREAM Out; 607 /** Number of samples to play (output), needed608 * for the timer routine. */609 uint32_t cSamplesLive;610 607 } HDADRIVER, *PHDADRIVER; 611 608 #endif /* VBOX_WITH_PDM_AUDIO_DRIVER */ … … 2550 2547 LogFlowFuncEnter(); 2551 2548 2549 uint32_t cbIn, cbOut, cSamplesLive; 2552 2550 RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node) 2553 2551 { 2554 uint32_t cbIn, cbOut;2555 2552 rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector, 2556 &cbIn, &cbOut, & pDrv->cSamplesLive);2553 &cbIn, &cbOut, &cSamplesLive); 2557 2554 if (RT_SUCCESS(rc)) 2558 2555 { 2559 2556 LogFlowFunc(("\tLUN#%RU8: [1] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut)); 2560 2557 2561 if ( pDrv->cSamplesLive)2558 if (cSamplesLive) 2562 2559 { 2563 2560 uint32_t cSamplesPlayed; 2564 2561 int rc2 = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, &cSamplesPlayed); 2565 2562 if (RT_SUCCESS(rc2)) 2566 {2567 2563 LogFlowFunc(("LUN#%RU8: cSamplesLive=%RU32, cSamplesPlayed=%RU32\n", 2568 pDrv->uLUN, pDrv->cSamplesLive, cSamplesPlayed)); 2569 Assert(pDrv->cSamplesLive >= cSamplesPlayed); 2570 pDrv->cSamplesLive -= cSamplesPlayed; 2571 } 2564 pDrv->uLUN, cSamplesLive, cSamplesPlayed)); 2572 2565 2573 2566 rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector, 2574 &cbIn, &cbOut, & pDrv->cSamplesLive);2567 &cbIn, &cbOut, &cSamplesLive); 2575 2568 if (RT_SUCCESS(rc)) 2576 2569 LogFlowFunc(("\tLUN#%RU8: [2] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut)); … … 2580 2573 cbOutMin = RT_MIN(cbOutMin, cbOut); 2581 2574 } 2582 else2583 pDrv->cSamplesLive = 0;2584 2575 } 2585 2576
Note:
See TracChangeset
for help on using the changeset viewer.