VirtualBox

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


Ignore:
Timestamp:
Feb 7, 2017 5:27:51 PM (8 years ago)
Author:
vboxsync
Message:

Renaming.

File:
1 edited

Legend:

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

    r65668 r65669  
    169169    }
    170170
    171     uint32_t csRead;
     171    uint32_t cRead;
    172172    if (pMixBuf->offRead + cSamplesToRead > pMixBuf->cSamples)
    173173    {
    174         csRead = pMixBuf->cSamples - pMixBuf->offRead;
     174        cRead = pMixBuf->cSamples - pMixBuf->offRead;
    175175        rc = VINF_TRY_AGAIN;
    176176    }
    177177    else
    178178    {
    179         csRead = cSamplesToRead;
     179        cRead = cSamplesToRead;
    180180        rc = VINF_SUCCESS;
    181181    }
    182182
    183     if (csRead > cSampleBuf)
    184     {
    185         csRead = cSampleBuf;
     183    if (cRead > cSampleBuf)
     184    {
     185        cRead = cSampleBuf;
    186186        rc = VINF_TRY_AGAIN;
    187187    }
    188188
    189     if (csRead)
    190     {
    191         memcpy(paSampleBuf, &pMixBuf->pSamples[pMixBuf->offRead], sizeof(PDMAUDIOSAMPLE) * csRead);
    192 
    193         pMixBuf->offRead = (pMixBuf->offRead + csRead) % pMixBuf->cSamples;
     189    if (cRead)
     190    {
     191        memcpy(paSampleBuf, &pMixBuf->pSamples[pMixBuf->offRead], sizeof(PDMAUDIOSAMPLE) * cRead);
     192
     193        pMixBuf->offRead = (pMixBuf->offRead + cRead) % pMixBuf->cSamples;
    194194        Assert(pMixBuf->offRead <= pMixBuf->cSamples);
    195         pMixBuf->cUsed -= RT_MIN(csRead, pMixBuf->cUsed);
     195        pMixBuf->cUsed -= RT_MIN(cRead, pMixBuf->cUsed);
    196196    }
    197197
    198198    if (pcSamplesRead)
    199         *pcSamplesRead = csRead;
     199        *pcSamplesRead = cRead;
    200200
    201201    return 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