VirtualBox

Changeset 88512 in vbox


Ignore:
Timestamp:
Apr 14, 2021 7:04:27 PM (3 years ago)
Author:
vboxsync
Message:

DrvHostAudioPulseAudio: Don't clamp the pfnStreamWritable result to BufAttr.maxlength, we deal with that by looping in pfnStreamPlay instead. bugref:9890

File:
1 edited

Legend:

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

    r88511 r88512  
    15231523            size_t cbWritablePa = pa_stream_writable_size(pStreamPA->pStream);
    15241524            if (cbWritablePa != (size_t)-1)
    1525             {
    1526                 /* Don't report more writable than the PA server can handle. */
    1527                 if (cbWritablePa <= pStreamPA->BufAttr.maxlength)
    1528                     cbWritable = (uint32_t)cbWritablePa;
    1529                 else
    1530                 {
    1531                     Log3Func(("Clamping cbWritablePa=%#zx to maxLength=%#RX32\n", cbWritablePa, pStreamPA->BufAttr.maxlength));
    1532                     cbWritable = (uint32_t)pStreamPA->BufAttr.maxlength;
    1533                 }
    1534             }
     1525                cbWritable = cbWritablePa <= UINT32_MAX ? (uint32_t)cbWritablePa : UINT32_MAX;
    15351526            else
    15361527                drvHostAudioPaError(pThis, "pa_stream_writable_size failed on '%s'", pStreamPA->Cfg.szName);
     
    15891580#ifdef LOG_ENABLED
    15901581    const pa_usec_t tsNowUs = pa_rtclock_now();
    1591     Log3Func(("play delta: %RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf));
     1582    Log3Func(("play delta: %'RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf));
    15921583    pStreamPA->tsLastReadWrittenUs = tsNowUs;
    15931584#endif
     
    16601651#ifdef LOG_ENABLED
    16611652    const pa_usec_t tsNowUs = pa_rtclock_now();
    1662     Log3Func(("capture delta: %RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf));
     1653    Log3Func(("capture delta: %'RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf));
    16631654    pStreamPA->tsLastReadWrittenUs = tsNowUs;
    16641655#endif
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