VirtualBox

Changeset 68085 in vbox


Ignore:
Timestamp:
Jul 21, 2017 12:52:58 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
117124
Message:

Build fix.

Location:
trunk/src/VBox
Files:
10 edited

Legend:

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

    r67577 r68085  
    10081008 */
    10091009static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1010                                                        void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     1010                                                       void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    10111011{
    10121012    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    10131013    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    10141014    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    1015     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
     1015    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
    10161016    /* pcbRead is optional. */
    10171017
     
    10351035        {
    10361036            case SND_PCM_STATE_PREPARED:
    1037                 cAvail = PDMAUDIOSTREAMCFG_B2S(pCfg, cbBuf);
     1037                cAvail = PDMAUDIOSTREAMCFG_B2S(pCfg, cxBuf);
    10381038                break;
    10391039
     
    10551055        if (!cAvail)
    10561056        {
    1057             if (pcbRead)
    1058                 *pcbRead = 0;
     1057            if (pcxRead)
     1058                *pcxRead = 0;
    10591059            return VINF_SUCCESS;
    10601060        }
     
    10651065     * the mixer buffer.
    10661066     */
    1067     size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_S2B(pCfg, cAvail), cbBuf);
     1067    size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_S2B(pCfg, cAvail), cxBuf);
    10681068
    10691069    LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail));
     
    11401140    if (RT_SUCCESS(rc))
    11411141    {
    1142         if (pcbRead)
    1143             *pcbRead = cbReadTotal;
     1142        if (pcxRead)
     1143            *pcxRead = cbReadTotal;
    11441144    }
    11451145
     
    11511151 */
    11521152static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1153                                                     const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     1153                                                    const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten)
    11541154{
    11551155    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    11561156    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    11571157    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    1158     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    1159     /* pcbWritten is optional. */
     1158    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     1159    /* pcxWritten is optional. */
    11601160
    11611161    PALSAAUDIOSTREAM pStreamALSA = (PALSAAUDIOSTREAM)pStream;
     
    11861186
    11871187        /* Do not write more than available. */
    1188         if (cbToWrite > cbBuf)
    1189             cbToWrite = cbBuf;
     1188        if (cbToWrite > cxBuf)
     1189            cbToWrite = cxBuf;
    11901190
    11911191        memcpy(pStreamALSA->pvBuf, pvBuf, cbToWrite);
     
    12571257    if (RT_SUCCESS(rc))
    12581258    {
    1259         if (pcbWritten)
    1260             *pcbWritten = cbWrittenTotal;
     1259        if (pcxWritten)
     1260            *pcxWritten = cbWrittenTotal;
    12611261    }
    12621262
  • trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp

    r67363 r68085  
    18881888 */
    18891889static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    1890                                                        void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     1890                                                       void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    18911891{
    18921892    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    18931893    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    1894     /* pcbRead is optional. */
     1894    /* pcxRead is optional. */
    18951895
    18961896    PCOREAUDIOSTREAM  pCAStream = (PCOREAUDIOSTREAM)pStream;
     
    19171917    if (ASMAtomicReadU32(&pCAStream->enmStatus) != COREAUDIOSTATUS_INIT)
    19181918    {
    1919         if (pcbRead)
    1920             *pcbRead = 0;
     1919        if (pcxRead)
     1920            *pcxRead = 0;
    19211921        return VINF_SUCCESS;
    19221922    }
     
    19311931    do
    19321932    {
    1933         size_t cbToWrite = RT_MIN(cbBuf, RTCircBufUsed(pCAStream->pCircBuf));
     1933        size_t cbToWrite = RT_MIN(cxBuf, RTCircBufUsed(pCAStream->pCircBuf));
    19341934
    19351935        uint8_t *pvChunk;
     
    19641964    if (RT_SUCCESS(rc))
    19651965    {
    1966         if (pcbRead)
    1967             *pcbRead = cbReadTotal;
     1966        if (pcxRead)
     1967            *pcxRead = cbReadTotal;
    19681968    }
    19691969
     
    19751975 */
    19761976static DECLCALLBACK(int) drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
    1977                                                     PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
    1978                                                     uint32_t *pcbWritten)
     1977                                                    PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf,
     1978                                                    uint32_t *pcxWritten)
    19791979{
    19801980    PDRVHOSTCOREAUDIO pThis     = PDMIHOSTAUDIO_2_DRVHOSTCOREAUDIO(pInterface);
     
    20012001    if (ASMAtomicReadU32(&pCAStream->enmStatus) != COREAUDIOSTATUS_INIT)
    20022002    {
    2003         if (pcbWritten)
    2004             *pcbWritten = 0;
     2003        if (pcxWritten)
     2004            *pcxWritten = 0;
    20052005        return VINF_SUCCESS;
    20062006    }
     
    20132013    AssertRC(rc);
    20142014
    2015     size_t cbToWrite = RT_MIN(cbBuf, RTCircBufFree(pCAStream->pCircBuf));
     2015    size_t cbToWrite = RT_MIN(cxBuf, RTCircBufFree(pCAStream->pCircBuf));
    20162016    Log3Func(("cbToWrite=%zu\n", cbToWrite));
    20172017
     
    20302030
    20312031        Assert(cbChunk <= cbToWrite);
    2032         Assert(cbWrittenTotal + cbChunk <= cbBuf);
     2032        Assert(cbWrittenTotal + cbChunk <= cxBuf);
    20332033
    20342034        memcpy(pvChunk, (uint8_t *)pvBuf + cbWrittenTotal, cbChunk);
     
    20772077    if (RT_SUCCESS(rc))
    20782078    {
    2079         if (pcbWritten)
    2080             *pcbWritten = cbWrittenTotal;
     2079        if (pcxWritten)
     2080            *pcxWritten = cbWrittenTotal;
    20812081    }
    20822082
  • trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp

    r65694 r68085  
    15491549 */
    15501550int drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface,
    1551                             PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     1551                            PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten)
    15521552{
    15531553    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    15541554    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    15551555    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    1556     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    1557     /* pcbRead is optional. */
     1556    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     1557    /* pcxWritten is optional. */
    15581558
    15591559    PDRVHOSTDSOUND pThis     = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     
    15871587        cbFree     -= cbSample;
    15881588
    1589         uint32_t cbLive = cbBuf;
     1589        uint32_t cbLive = cxBuf;
    15901590
    15911591        /* Do not write more than available space in the DirectSound playback buffer. */
     
    16711671    if (RT_SUCCESS(rc))
    16721672    {
    1673         if (pcbWritten)
    1674             *pcbWritten = cbWrittenTotal;
     1673        if (pcxWritten)
     1674            *pcxWritten = cbWrittenTotal;
    16751675    }
    16761676    else
     
    17821782 */
    17831783int drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface,
    1784                                PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     1784                               PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    17851785{
    17861786
     
    17881788    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    17891789    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    1790     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
     1790    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
    17911791
    17921792    PDRVHOSTDSOUND pThis     = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface);
     
    18341834            break;
    18351835
    1836         if (cbBuf == 0)
     1836        if (cxBuf == 0)
    18371837        {
    18381838            DSLOGF(("DSound: Capture buffer full\n"));
     
    18411841
    18421842        DSLOGF(("DSound: Capture cbBuf=%RU32, offCurPos=%ld, offCaptureBufRead=%ld, cbToCapture=%ld\n",
    1843                 cbBuf, offCurPos, pStreamDS->In.offCaptureBufRead, cbToCapture));
     1843                cxBuf, offCurPos, pStreamDS->In.offCaptureBufRead, cbToCapture));
    18441844
    18451845        /* No need to fetch more samples than mix buffer can receive. */
    1846         cbToCapture = RT_MIN(cbToCapture, cbBuf);
     1846        cbToCapture = RT_MIN(cbToCapture, cxBuf);
    18471847
    18481848        /* Lock relevant range in the DirectSound capture buffer. */
     
    18851885    if (RT_SUCCESS(rc))
    18861886    {
    1887         if (pcbRead)
    1888             *pcbRead = cbReadTotal;
     1887        if (pcxRead)
     1888            *pcxRead = cbReadTotal;
    18891889    }
    18901890    else
  • trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp

    r67362 r68085  
    213213 */
    214214static DECLCALLBACK(int) drvHostDebugAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
    215                                                      PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
    216                                                      uint32_t *pcbWritten)
     215                                                     PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf,
     216                                                     uint32_t *pcxWritten)
    217217{
    218218    RT_NOREF(pInterface);
     
    221221    uint32_t cbWrittenTotal = 0;
    222222
    223     uint32_t cbAvail = cbBuf;
     223    uint32_t cbAvail = cxBuf;
    224224    while (cbAvail)
    225225    {
     
    249249    }
    250250
    251     if (pcbWritten)
    252         *pcbWritten = cbWrittenTotal;
     251    if (pcxWritten)
     252        *pcxWritten = cbWrittenTotal;
    253253
    254254    return VINF_SUCCESS;
     
    260260 */
    261261static DECLCALLBACK(int) drvHostDebugAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    262                                                         void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
    263 {
    264     RT_NOREF(pInterface, pStream, pvBuf, cbBuf);
     262                                                        void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
     263{
     264    RT_NOREF(pInterface, pStream, pvBuf, cxBuf);
    265265
    266266    /* Never capture anything. */
    267     if (pcbRead)
    268         *pcbRead = 0;
     267    if (pcxRead)
     268        *pcxRead = 0;
    269269
    270270    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp

    r65694 r68085  
    135135 */
    136136static DECLCALLBACK(int) drvHostNullAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    137                                                     const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     137                                                    const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten)
    138138{
    139139    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    140140    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    141141    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    142     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
     142    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
    143143
    144144    RT_NOREF(pInterface, pStream, pvBuf);
     
    146146    /* Note: No copying of samples needed here, as this a NULL backend. */
    147147
    148     if (pcbWritten)
    149         *pcbWritten = cbBuf; /* Return all bytes as written. */
     148    if (pcxWritten)
     149        *pcxWritten = cxBuf; /* Return all bytes as written. */
    150150
    151151    return VINF_SUCCESS;
     
    157157 */
    158158static DECLCALLBACK(int) drvHostNullAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    159                                                        void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     159                                                       void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    160160{
    161161    RT_NOREF(pInterface, pStream);
    162162
    163163    /* Return silence. */
    164     RT_BZERO(pvBuf, cbBuf);
    165 
    166     if (pcbRead)
    167         *pcbRead = cbBuf;
     164    RT_BZERO(pvBuf, cxBuf);
     165
     166    if (pcxRead)
     167        *pcxRead = cxBuf;
    168168
    169169    return VINF_SUCCESS;
  • trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp

    r65694 r68085  
    410410 */
    411411static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    412                                                       void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     412                                                      void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    413413{
    414414    RT_NOREF(pInterface);
     
    419419    int rc = VINF_SUCCESS;
    420420
    421     size_t cbToRead = RT_MIN(pStreamOSS->cbBuf, cbBuf);
     421    size_t cbToRead = RT_MIN(pStreamOSS->cbBuf, cxBuf);
    422422
    423423    LogFlowFunc(("cbToRead=%zi\n", cbToRead));
     
    479479    if (RT_SUCCESS(rc))
    480480    {
    481         if (pcbRead)
    482             *pcbRead = cbReadTotal;
     481        if (pcxRead)
     482            *pcxRead = cbReadTotal;
    483483    }
    484484
     
    798798 */
    799799static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
    800                                                    PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
    801                                                    uint32_t *pcbWritten)
     800                                                   PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf,
     801                                                   uint32_t *pcxWritten)
    802802{
    803803    RT_NOREF(pInterface);
     
    815815    do
    816816    {
    817         uint32_t cbAvail = cbBuf;
     817        uint32_t cbAvail = cxBuf;
    818818        uint32_t cbToWrite;
    819819
     
    838838                cbData = cntinfo.ptr - pStreamOSS->old_optr;
    839839            else
    840                 cbData = cbBuf + cntinfo.ptr - pStreamOSS->old_optr;
     840                cbData = cxBuf + cntinfo.ptr - pStreamOSS->old_optr;
    841841            Assert(cbData >= 0);
    842842
     
    855855            }
    856856
    857             if ((size_t)abinfo.bytes > cbBuf)
    858             {
    859                 LogRel2(("OSS: Warning: Too big output size (%d > %RU32), limiting to %RU32\n", abinfo.bytes, cbBuf, cbBuf));
    860                 abinfo.bytes = cbBuf;
     857            if ((size_t)abinfo.bytes > cxBuf)
     858            {
     859                LogRel2(("OSS: Warning: Too big output size (%d > %RU32), limiting to %RU32\n", abinfo.bytes, cxBuf, cxBuf));
     860                abinfo.bytes = cxBuf;
    861861                /* Keep going. */
    862862            }
     
    864864            if (abinfo.bytes < 0)
    865865            {
    866                 LogRel2(("OSS: Warning: Invalid available size (%d vs. %RU32)\n", abinfo.bytes, cbBuf));
     866                LogRel2(("OSS: Warning: Invalid available size (%d vs. %RU32)\n", abinfo.bytes, cxBuf));
    867867                rc = VERR_INVALID_PARAMETER;
    868868                break;
     
    921921    if (RT_SUCCESS(rc))
    922922    {
    923         if (pcbWritten)
    924             *pcbWritten = cbWrittenTotal;
     923        if (pcxWritten)
     924            *pcxWritten = cbWrittenTotal;
    925925    }
    926926
  • trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp

    r68039 r68085  
    827827 */
    828828static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterface,
    829                                                         PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
    830 {
    831     RT_NOREF(pvBuf, cbBuf);
     829                                                        PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
     830{
     831    RT_NOREF(pvBuf, cxBuf);
    832832    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    833833    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    834834    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    835     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
     835    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
    836836    /* pcbRead is optional. */
    837837
     
    858858    if (!cbAvail) /* No data? Bail out. */
    859859    {
    860         if (pcbRead)
    861             *pcbRead = 0;
     860        if (pcxRead)
     861            *pcxRead = 0;
    862862        return VINF_SUCCESS;
    863863    }
     
    865865    int rc = VINF_SUCCESS;
    866866
    867     size_t cbToRead = RT_MIN(cbAvail, cbBuf);
     867    size_t cbToRead = RT_MIN(cbAvail, cxBuf);
    868868
    869869    Log3Func(("cbToRead=%zu, cbAvail=%zu, offPeekBuf=%zu, cbPeekBuf=%zu\n",
     
    933933    if (RT_SUCCESS(rc))
    934934    {
    935         if (pcbRead)
    936             *pcbRead = cbReadTotal;
     935        if (pcxRead)
     936            *pcxRead = cbReadTotal;
    937937    }
    938938
     
    945945 */
    946946static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
    947                                                      PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
    948                                                      uint32_t *pcbWritten)
    949 {
    950     RT_NOREF(pvBuf, cbBuf);
     947                                                     PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf,
     948                                                     uint32_t *pcxWritten)
     949{
     950    RT_NOREF(pvBuf, cxBuf);
    951951    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    952952    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    953953    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    954     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    955     /* pcbWritten is optional. */
     954    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     955    /* pcxWritten is optional. */
    956956
    957957    PDRVHOSTPULSEAUDIO pThis     = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface);
     
    973973        }
    974974
    975         size_t cbLeft = RT_MIN(cbWriteable, cbBuf);
     975        size_t cbLeft = RT_MIN(cbWriteable, cxBuf);
    976976
    977977        while (cbLeft)
     
    999999    if (RT_SUCCESS(rc))
    10001000    {
    1001         if (pcbWritten)
    1002             *pcbWritten = cbWrittenTotal;
     1001        if (pcxWritten)
     1002            *pcxWritten = cbWrittenTotal;
    10031003    }
    10041004
  • trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp

    r67282 r68085  
    243243 */
    244244static DECLCALLBACK(int) drvHostVaKitAudioStreamPlay(PPDMIHOSTAUDIO pInterface,
    245                                                      PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cbBuf,
    246                                                      uint32_t *pcbWritten)
     245                                                     PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf,
     246                                                     uint32_t *pcxWritten)
    247247{
    248248    PDRVHOSTVAKITAUDIO pDrv       = RT_FROM_MEMBER(pInterface, DRVHOSTVAKITAUDIO, IHostAudio);
     
    265265
    266266    // Microseconds are used everythere below
    267     uint32_t sBuf = cbBuf >> pStreamDbg->pCfg->Props.cShift;
     267    uint32_t sBuf = cxBuf >> pStreamDbg->pCfg->Props.cShift;
    268268    cch = RTStrPrintf(szTimingInfo, sizeof(szTimingInfo), "%d %d %d %d\n",
    269269        (uint32_t)(tsSinceStart / 1000), // Host time elapsed since Guest submitted the first buffer for playback
     
    277277   // pStreamDbg->Out.tsLastPlayed = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);;
    278278
    279     int rc2 = DrvAudioHlpWAVFileWrite(&pStreamDbg->File, pvBuf, cbBuf, 0 /* fFlags */);
     279    int rc2 = DrvAudioHlpWAVFileWrite(&pStreamDbg->File, pvBuf, cxBuf, 0 /* fFlags */);
    280280    if (RT_FAILURE(rc2))
    281281        LogRel(("DebugAudio: Writing output failed with %Rrc\n", rc2));
    282282
    283     *pcbWritten = cbBuf;
     283    *pcxWritten = cxBuf;
    284284
    285285    return VINF_SUCCESS;
     
    291291 */
    292292static DECLCALLBACK(int) drvHostVaKitAudioStreamCapture(PPDMIHOSTAUDIO pInterface,
    293                                                         PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
    294 {
    295     RT_NOREF(pInterface, pStream, pvBuf, cbBuf);
     293                                                        PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf,
     294                                                        uint32_t *pcxRead)
     295{
     296    RT_NOREF(pInterface, pStream, pvBuf, cxBuf);
    296297
    297298    /* Never capture anything. */
    298     if (pcbRead)
    299         *pcbRead = 0;
     299    if (pcxRead)
     300        *pcxRead = 0;
    300301
    301302    return VINF_SUCCESS;
  • trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp

    r68046 r68085  
    220220 */
    221221static DECLCALLBACK(int) drvAudioVRDEStreamCapture(PPDMIHOSTAUDIO pInterface,
    222                                                    PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
     222                                                   PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
    223223{
    224224    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    225225    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    226226    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    227     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    228     /* pcbRead is optional. */
     227    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     228    /* pcxRead is optional. */
    229229
    230230    PVRDESTREAM pStreamVRDE = (PVRDESTREAM)pStream;
     
    236236        void *pvData;
    237237
    238         RTCircBufAcquireReadBlock(pStreamVRDE->In.pCircBuf, cbBuf, &pvData, &cbData);
     238        RTCircBufAcquireReadBlock(pStreamVRDE->In.pCircBuf, cxBuf, &pvData, &cbData);
    239239
    240240        if (cbData)
     
    244244    }
    245245
    246     if (pcbRead)
    247         *pcbRead = (uint32_t)cbData;
     246    if (pcxRead)
     247        *pcxRead = (uint32_t)cbData;
    248248
    249249    return VINF_SUCCESS;
     
    255255 */
    256256static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    257                                                 const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     257                                                const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten)
    258258{
    259259    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    260260    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    261261    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    262     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    263     /* pcbWritten is optional. */
     262    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     263    /* pcxWritten is optional. */
    264264
    265265    PDRVAUDIOVRDE pDrv        = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio);
     
    271271    /* Note: We get the number of *samples* in cbBuf
    272272     *       (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout) on stream creation. */
    273     uint32_t csLive           = cbBuf;
     273    uint32_t csLive           = cxBuf;
    274274
    275275    PPDMAUDIOPCMPROPS pProps  = &pStreamVRDE->pCfg->Props;
     
    328328        /* Return samples instead of bytes here
    329329         * (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout). */
    330         if (pcbWritten)
    331             *pcbWritten = csWritten;
     330        if (pcxWritten)
     331            *pcxWritten = csWritten;
    332332    }
    333333
  • trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp

    r67914 r68085  
    508508 */
    509509static DECLCALLBACK(int) drvAudioVideoRecStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    510                                                        void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
    511 {
    512     RT_NOREF(pInterface, pStream, pvBuf, cbBuf);
    513 
    514     if (pcbRead)
    515         *pcbRead = 0;
     510                                                       void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead)
     511{
     512    RT_NOREF(pInterface, pStream, pvBuf, cxBuf);
     513
     514    if (pcxRead)
     515        *pcxRead = 0;
    516516
    517517    return VINF_SUCCESS;
     
    523523 */
    524524static DECLCALLBACK(int) drvAudioVideoRecStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream,
    525                                                     const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
     525                                                    const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten)
    526526{
    527527    AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
    528528    AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
    529529    AssertPtrReturn(pvBuf,      VERR_INVALID_POINTER);
    530     AssertReturn(cbBuf,         VERR_INVALID_PARAMETER);
    531     /* pcbWritten is optional. */
     530    AssertReturn(cxBuf,         VERR_INVALID_PARAMETER);
     531    /* pcxWritten is optional. */
    532532
    533533    PDRVAUDIOVIDEOREC pThis     = PDMIHOSTAUDIO_2_DRVAUDIOVIDEOREC(pInterface);
     
    551551    size_t cbCircBuf;
    552552
    553     uint32_t cbToWrite = cbBuf;
     553    uint32_t cbToWrite = cxBuf;
    554554
    555555    /*
     
    692692     * encoder actually did process those.
    693693     */
    694     if (pcbWritten)
    695         *pcbWritten = cbWrittenTotal;
     694    if (pcxWritten)
     695        *pcxWritten = cbWrittenTotal;
    696696
    697697    LogFlowFunc(("csReadTotal=%RU32, rc=%Rrc\n", cbWrittenTotal, rc));
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