Changeset 89376 in vbox for trunk/src/VBox
- Timestamp:
- May 30, 2021 12:16:29 AM (4 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r89373 r89376 273 273 while (cFrames-- > 0) 274 274 { 275 audioMixBufBlendSample(&pi64Dst[0], pi64 Dst[0]);276 audioMixBufBlendSample(&pi64Dst[1], pi64 Dst[1]);275 audioMixBufBlendSample(&pi64Dst[0], pi64Src[0]); 276 audioMixBufBlendSample(&pi64Dst[1], pi64Src[1]); 277 277 pi64Dst += 2; 278 278 pi64Src += 2; … … 286 286 while (cFrames-- > 0) 287 287 { 288 audioMixBufBlendSample(pi64Dst, pi64 Dst[0]);288 audioMixBufBlendSample(pi64Dst, pi64Src[0]); 289 289 pi64Dst++; 290 290 pi64Src++; … … 1741 1741 * First chunk. 1742 1742 */ 1743 uint32_t cChunk = RT_MIN(pMixBuf->cFrames - offFrame, cFrames); 1744 RT_BZERO(&pMixBuf->pFrames[offFrame], cChunk * sizeof(pMixBuf->pFrames[0])); 1745 cFrames -= cChunk; 1743 uint32_t const cFramesChunk1 = RT_MIN(pMixBuf->cFrames - offFrame, cFrames); 1744 RT_BZERO(&pMixBuf->pFrames[offFrame], cFramesChunk1 * sizeof(pMixBuf->pFrames[0])); 1746 1745 1747 1746 /* 1748 1747 * Second chunk, if needed. 1749 1748 */ 1750 if (cFrames > 0) 1751 { 1749 if (cFrames > cFramesChunk1) 1750 { 1751 cFrames -= cFramesChunk1; 1752 1752 AssertStmt(cFrames <= pMixBuf->cFrames, cFrames = pMixBuf->cFrames); 1753 1753 RT_BZERO(&pMixBuf->pFrames[0], cFrames * sizeof(pMixBuf->pFrames[0])); -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r89374 r89376 469 469 break; 470 470 471 #if 0 /** @todo doesn't work for some U64 variations */472 471 case 1: /* zero & blend */ 473 472 AudioMixBufSilence(&MixBuf, &WriteStateIgnZero, 0 /*offFrame*/, cSrcFramesToWrite); … … 476 475 RTTESTI_CHECK(cFrames == cSrcFramesToWrite); 477 476 break; 478 #endif479 477 480 478 case 2: /* blend same equal data twice */
Note:
See TracChangeset
for help on using the changeset viewer.