VirtualBox

Changeset 65733 in vbox


Ignore:
Timestamp:
Feb 10, 2017 3:37:38 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
113448
Message:

DrvAudioVRDE.cpp: Return available samples in drvAudioVRDEStreamGetReadable().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r65694 r65733  
    500500static DECLCALLBACK(uint32_t) drvAudioVRDEStreamGetReadable(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream)
    501501{
    502     RT_NOREF(pInterface, pStream);
    503 
    504     return UINT32_MAX;
     502    RT_NOREF(pInterface);
     503
     504    PVRDESTREAM pStreamVRDE = (PVRDESTREAM)pStream;
     505
     506    if (pStreamVRDE->pCfg->enmDir == PDMAUDIODIR_IN)
     507    {
     508        /* Return samples instead of bytes here
     509         * (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout). */
     510        return PDMAUDIOSTREAMCFG_B2S(pStreamVRDE->pCfg, RTCircBufUsed(pStreamVRDE->In.pCircBuf));
     511    }
     512
     513    return 0;
    505514}
    506515
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