Changeset 54420 in vbox
- Timestamp:
- Feb 24, 2015 8:22:47 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r54399 r54420 99 99 pMixBuf->offReadWrite = (pMixBuf->offReadWrite + cSamplesRead) % pMixBuf->cSamples; 100 100 Assert(pMixBuf->offReadWrite <= pMixBuf->cSamples); 101 pMixBuf->cProcessed -= RT_ CLAMP(cSamplesRead, 0, pMixBuf->cProcessed);101 pMixBuf->cProcessed -= RT_MIN(cSamplesRead, pMixBuf->cProcessed); 102 102 103 103 *pcSamplesRead = cSamplesRead; … … 1032 1032 { 1033 1033 pMixBuf->offReadWrite = offRead % pMixBuf->cSamples; 1034 pMixBuf->cProcessed -= RT_ CLAMP(cLenSrc1 + cLenSrc2, 0, pMixBuf->cProcessed);1034 pMixBuf->cProcessed -= RT_MIN(cLenSrc1 + cLenSrc2, pMixBuf->cProcessed); 1035 1035 1036 1036 if (pcRead) … … 1296 1296 { 1297 1297 pMixBuf->offReadWrite = offWrite % pMixBuf->cSamples; 1298 pMixBuf->cProcessed = RT_ CLAMP(pMixBuf->cProcessed + cLenDst1 + cLenDst2,1299 0 /* Min */,pMixBuf->cSamples /* Max */);1298 pMixBuf->cProcessed = RT_MIN(pMixBuf->cProcessed + cLenDst1 + cLenDst2, 1299 pMixBuf->cSamples /* Max */); 1300 1300 if (pcWritten) 1301 1301 *pcWritten = cLenDst1 + cLenDst2;
Note:
See TracChangeset
for help on using the changeset viewer.