- Timestamp:
- Feb 3, 2017 10:55:10 AM (8 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r65586 r65596 281 281 */ 282 282 uint32_t cbWritten = 0; 283 284 283 while (cbToWrite) 285 284 { 286 uint32_t cbChunk = cbToWrite; /** @todo For now write all at once. */ 287 288 pDrv->pConsoleVRDPServer->SendAudioSamples((uint8_t *)pvBuf + cbWritten, cbChunk, format); 289 285 /* Make sure that this is even, as we send the number of samples to the VRDP server. */ 286 uint32_t cbChunk = (cbToWrite % 2 == 0) ? cbToWrite : cbToWrite - 1; /** @todo For now write all at once. */ 287 Assert(cbChunk % 2 == 0); 288 289 if (!cbChunk) /* Nothing to send. Bail out. */ 290 break; 291 292 pDrv->pConsoleVRDPServer->SendAudioSamples((uint8_t *)pvBuf + cbWritten, 293 PDMAUDIOPCMPROPS_B2S(&pStreamVRDE->Props, cbChunk) /* Samples */, format); 290 294 cbWritten += cbChunk; 291 295 Assert(cbWritten <= cbBuf); … … 297 301 if (RT_SUCCESS(rc)) 298 302 { 299 /* 300 * Always report back all samples acquired, regardless of whether the 301 * VRDP server actually did process those. 302 */ 303 Assert(cbWritten % 2 == 0); /* Paranoia. */ 304 303 305 if (pcbWritten) 304 *pcbWritten = cb ToWrite;306 *pcbWritten = cbWritten; 305 307 } 306 308
Note:
See TracChangeset
for help on using the changeset viewer.

