VirtualBox

Changeset 54235 in vbox


Ignore:
Timestamp:
Feb 17, 2015 3:08:51 PM (10 years ago)
Author:
vboxsync
Message:

PDM/Audio: Remove unused code.

Location:
trunk/src/VBox/Devices/Audio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Audio/DevIchAc97.cpp

    r54230 r54235  
    260260    /** Stream for output. */
    261261    AC97OUTPUTSTREAM                   Out;
    262     /** Number of samples to play (output), needed
    263      *  for the timer routine. */
    264     uint32_t                           cSamplesLive;
    265262} AC97DRIVER, *PAC97DRIVER;
    266263#endif /* VBOX_WITH_PDM_AUDIO_DRIVER */
     
    12891286    LogFlowFuncEnter();
    12901287
     1288    uint32_t cbIn, cbOut, cSamplesLive;
    12911289    RTListForEach(&pThis->lstDrv, pDrv, AC97DRIVER, Node)
    12921290    {
    1293         uint32_t cbIn, cbOut;
    12941291        rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
    1295                                               &cbIn, &cbOut, &pDrv->cSamplesLive);
     1292                                              &cbIn, &cbOut, &cSamplesLive);
    12961293        if (RT_SUCCESS(rc))
    12971294        {
    12981295            LogFlowFunc(("\tLUN#%RU8: [1] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut));
    12991296
    1300             if (pDrv->cSamplesLive)
     1297            if (cSamplesLive)
    13011298            {
    13021299                uint32_t cSamplesPlayed;
    13031300                int rc2 = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, &cSamplesPlayed);
    13041301                if (RT_SUCCESS(rc2))
    1305                 {
    13061302                    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));
    13111304
    13121305                rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
    1313                                                       &cbIn, &cbOut, &pDrv->cSamplesLive);
     1306                                                      &cbIn, &cbOut, &cSamplesLive);
    13141307                if (RT_SUCCESS(rc))
    13151308                    LogFlowFunc(("\tLUN#%RU8: [2] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut));
     
    13191312            cbOutMin = RT_MIN(cbOutMin, cbOut);
    13201313        }
    1321         else
    1322             pDrv->cSamplesLive = 0;
    13231314    }
    13241315
  • trunk/src/VBox/Devices/Audio/DevIchHda.cpp

    r54234 r54235  
    605605    /** Stream for output. */
    606606    HDAOUTPUTSTREAM                    Out;
    607     /** Number of samples to play (output), needed
    608      *  for the timer routine. */
    609     uint32_t                           cSamplesLive;
    610607} HDADRIVER, *PHDADRIVER;
    611608#endif /* VBOX_WITH_PDM_AUDIO_DRIVER */
     
    25502547    LogFlowFuncEnter();
    25512548
     2549    uint32_t cbIn, cbOut, cSamplesLive;
    25522550    RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
    25532551    {
    2554         uint32_t cbIn, cbOut;
    25552552        rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
    2556                                               &cbIn, &cbOut, &pDrv->cSamplesLive);
     2553                                              &cbIn, &cbOut, &cSamplesLive);
    25572554        if (RT_SUCCESS(rc))
    25582555        {
    25592556            LogFlowFunc(("\tLUN#%RU8: [1] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut));
    25602557
    2561             if (pDrv->cSamplesLive)
     2558            if (cSamplesLive)
    25622559            {
    25632560                uint32_t cSamplesPlayed;
    25642561                int rc2 = pDrv->pConnector->pfnPlayOut(pDrv->pConnector, &cSamplesPlayed);
    25652562                if (RT_SUCCESS(rc2))
    2566                 {
    25672563                    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));
    25722565
    25732566                rc = pDrv->pConnector->pfnQueryStatus(pDrv->pConnector,
    2574                                                       &cbIn, &cbOut, &pDrv->cSamplesLive);
     2567                                                      &cbIn, &cbOut, &cSamplesLive);
    25752568                if (RT_SUCCESS(rc))
    25762569                    LogFlowFunc(("\tLUN#%RU8: [2] cbIn=%RU32, cbOut=%RU32\n", pDrv->uLUN, cbIn, cbOut));
     
    25802573            cbOutMin = RT_MIN(cbOutMin, cbOut);
    25812574        }
    2582         else
    2583             pDrv->cSamplesLive = 0;
    25842575    }
    25852576
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette