Changeset 65668 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Feb 7, 2017 5:21:37 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113364
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r65667 r65668 6 6 7 7 /* 8 * Copyright (C) 2014-201 6Oracle Corporation8 * Copyright (C) 2014-2017 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 180 180 rc = VINF_SUCCESS; 181 181 } 182 182 183 if (csRead > cSampleBuf) 183 184 { … … 186 187 } 187 188 188 memcpy(paSampleBuf, &pMixBuf->pSamples[pMixBuf->offRead], sizeof(PDMAUDIOSAMPLE) * csRead); 189 190 pMixBuf->offRead = (pMixBuf->offRead + csRead) % pMixBuf->cSamples; 191 Assert(pMixBuf->offRead <= pMixBuf->cSamples); 192 pMixBuf->cUsed -= RT_MIN(csRead, pMixBuf->cUsed); 189 if (csRead) 190 { 191 memcpy(paSampleBuf, &pMixBuf->pSamples[pMixBuf->offRead], sizeof(PDMAUDIOSAMPLE) * csRead); 192 193 pMixBuf->offRead = (pMixBuf->offRead + csRead) % pMixBuf->cSamples; 194 Assert(pMixBuf->offRead <= pMixBuf->cSamples); 195 pMixBuf->cUsed -= RT_MIN(csRead, pMixBuf->cUsed); 196 } 193 197 194 198 if (pcSamplesRead)
Note:
See TracChangeset
for help on using the changeset viewer.