VirtualBox

Changeset 76894 in vbox for trunk/src/VBox/Devices/Audio


Ignore:
Timestamp:
Jan 18, 2019 2:33:52 PM (6 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Only enter (pre-)buffering stage again on a buffer underrun if we actually configured (pre-)buffering.

File:
1 edited

Legend:

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

    r76868 r76894  
    14621462                  DrvAudioHlpFramesToMilli(cfLive, &pStream->Host.Cfg.Props), uLivePercent, pStream->fThresholdReached));
    14631463
    1464         /* Has the treshold been reached (e.g. are we in playing stage) and we now have no live samples to process? */
    1465         if (   pStream->fThresholdReached
    1466             && cfLive == 0)
    1467         {
    1468             LogRel2(("Audio: Buffer underrun for stream '%s' occurred (%RU64ms passed but only %RU64ms in buffer)\n",
    1469                      pStream->szName,
    1470                      DrvAudioHlpFramesToMilli(cfPassedReal, &pStream->Host.Cfg.Props),
    1471                      DrvAudioHlpFramesToMilli(cfLive, &pStream->Host.Cfg.Props)));
    1472 
    1473             /* Enter buffering stage again. */
    1474             pStream->fThresholdReached = false;
     1464        if (   pStream->fThresholdReached         /* Has the treshold been reached (e.g. are we in playing stage) ... */
     1465            && cfLive == 0)                       /* ... and we now have no live samples to process? */
     1466        {
     1467            LogRel2(("Audio: Buffer underrun for stream '%s' occurred (%RU64ms passed)\n",
     1468                     pStream->szName, DrvAudioHlpFramesToMilli(cfPassedReal, &pStream->Host.Cfg.Props)));
     1469
     1470            if (pStream->Host.Cfg.Backend.cfPreBuf) /* Any pre-buffering configured? */
     1471            {
     1472                /* Enter pre-buffering stage again. */
     1473                pStream->fThresholdReached = false;
     1474            }
    14751475        }
    14761476
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