- Timestamp:
- Sep 3, 2018 9:47:49 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r74034 r74035 1366 1366 1367 1367 size_t cbToWrite = audioBuffer->mAudioDataByteSize; 1368 size_t cbLeft = cbToWrite;1368 size_t cbLeft = RT_MIN(cbToWrite, RTCircBufFree(pCircBuf)); 1369 1369 1370 1370 while (cbLeft) … … 1373 1373 RTCircBufAcquireWriteBlock(pCircBuf, cbLeft, (void **)&pvDst, &cbToWrite); 1374 1374 1375 if ( !cbToWrite)1376 break;1377 1378 /* Copy the data from our ring buffer to the core audio buffer. */1379 memcpy((UInt8 *)pvDst, pvSrc + cbWritten, cbToWrite);1375 if (cbToWrite) 1376 { 1377 /* Copy the data from our ring buffer to the core audio buffer. */ 1378 memcpy((UInt8 *)pvDst, pvSrc + cbWritten, cbToWrite); 1379 } 1380 1380 1381 1381 /* Release the read buffer, so it could be used for new data. */
Note:
See TracChangeset
for help on using the changeset viewer.