VirtualBox

Changeset 87854 in vbox


Ignore:
Timestamp:
Feb 23, 2021 5:49:17 PM (4 years ago)
Author:
vboxsync
Message:

Audio/DrvAudio: Streamline drvAudioStreamGetReadable() a bit more.

File:
1 edited

Legend:

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

    r87849 r87854  
    29552955             * Reading the actual data from a stream then will return silence then.
    29562956             */
    2957             if (  !DrvAudioHlpStreamStatusCanRead(
    2958                       pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pStream->pvBackend)
    2959                 || fDisabled))
     2957            PDMAUDIOSTREAMSTS fStatus = PDMAUDIOSTREAMSTS_FLAGS_NONE;
     2958            if (pThis->pHostDrvAudio->pfnStreamGetStatus)
     2959                fStatus = pThis->pHostDrvAudio->pfnStreamGetStatus(pThis->pHostDrvAudio, pStream->pvBackend);
     2960            if (   !DrvAudioHlpStreamStatusCanRead(fStatus)
     2961                || fDisabled)
    29602962            {
    29612963                cbReadable = DrvAudioHlpNanoToBytes(RTTimeNanoTS() - pStream->tsLastReadWrittenNs,
     
    29632965                if (!(pStream->fWarningsShown & PDMAUDIOSTREAM_WARN_FLAGS_DISABLED))
    29642966                {
    2965                     LogRel(("Audio: Stream '%s' not ready or driver has disabled audio input, returning silence\n", pStream->szName));
     2967                    LogRel(("Audio: Warning: Stream '%s' not ready or driver has disabled audio input (stream status is %#x, VM input status is %s), returning silence\n",
     2968                            pStream->szName, fStatus, fDisabled ? "disabled" : "enabled"));
    29662969                    pStream->fWarningsShown |= PDMAUDIOSTREAM_WARN_FLAGS_DISABLED;
    29672970                }
     
    29702973
    29712974        /* Make sure to align the readable size to the guest's frame size. */
    2972         cbReadable = DrvAudioHlpBytesAlign(cbReadable, &pStream->Guest.Cfg.Props);
     2975        if (cbReadable)
     2976            cbReadable = DrvAudioHlpBytesAlign(cbReadable, &pStream->Guest.Cfg.Props);
    29732977    }
    29742978
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