VirtualBox

Changeset 89527 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Jun 6, 2021 11:07:39 PM (4 years ago)
Author:
vboxsync
Message:

DrvHostAudioPulseAudio: Fixed bug in drvHstAudPaHA_StreamGetReadable where it would return a too high value when we have a peek buffer left over from a previous drvHstAudPaHA_StreamCapture. Same as in the windows wasapi, the peeked buffer is still part of the readable count and must be subtrackted. bugref:9890

File:
1 edited

Legend:

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

    r89526 r89527  
    18551855            size_t cbReadablePa = pa_stream_readable_size(pStreamPA->pStream);
    18561856            if (cbReadablePa != (size_t)-1)
    1857                 cbReadable = (uint32_t)cbReadablePa;
     1857            {
     1858                /* As with WASAPI on windows, the peek buffer must be subtracked.*/
     1859                if (cbReadablePa >= pStreamPA->cbPeekBuf)
     1860                    cbReadable = (uint32_t)(cbReadablePa - pStreamPA->cbPeekBuf);
     1861                else
     1862                {
     1863                    AssertMsgFailed(("%#zx vs %#zx\n", cbReadablePa, pStreamPA->cbPeekBuf));
     1864                    cbReadable = 0;
     1865                }
     1866            }
    18581867            else
    18591868                drvHstAudPaError(pThis, "pa_stream_readable_size failed on '%s'", pStreamPA->Cfg.szName);
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