Changeset 73814 in vbox
- Timestamp:
- Aug 22, 2018 8:40:54 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r73812 r73814 871 871 ("Stream '%s' is not an output stream and therefore cannot be written to (direction is 0x%x)\n", 872 872 pStream->szName, pStream->enmDir)); 873 874 AssertMsg(DrvAudioHlpBytesIsAligned(cbBuf, &pStream->Guest.Cfg.Props),875 ("Writing audio data (%RU32 bytes) to stream '%s' is not properly aligned\n", cbBuf, pStream->szName));876 873 877 874 uint32_t cbWrittenTotal = 0; … … 1455 1452 if (fDoPlay) 1456 1453 { 1457 uint32_t cfWritable; 1458 if (pThis->pHostDrvAudio->pfnStreamGetWritable) 1459 { 1460 cfWritable = PDMAUDIOPCMPROPS_B2F(&pStream->Host.Cfg.Props, 1461 pThis->pHostDrvAudio->pfnStreamGetWritable(pThis->pHostDrvAudio, pStream->pvBackend)); 1462 } 1463 else 1464 cfWritable = cfPeriod; 1454 uint32_t cfWritable = PDMAUDIOPCMPROPS_B2F(&pStream->Host.Cfg.Props, 1455 pThis->pHostDrvAudio->pfnStreamGetWritable(pThis->pHostDrvAudio, pStream->pvBackend)); 1465 1456 1466 1457 uint32_t cfToPlay = 0; … … 1469 1460 1470 1461 if (!cfToPlay) 1471 cfToPlay = cfWritable; 1462 { 1463 /* Did we reach/pass (in real time) the device scheduling slot? 1464 * Play as much as we can write to the backend then. */ 1465 if (cfPassedReal >= DrvAudioHlpMilliToFrames(pStream->Guest.Cfg.Device.uSchedulingHintMs, &pStream->Host.Cfg.Props)) 1466 cfToPlay = cfWritable; 1467 } 1472 1468 1473 1469 if (cfToPlay > cfLive) /* Don't try to play more than available. */ … … 2800 2796 cbWritable = AudioMixBufFreeBytes(&pStream->Host.MixBuf); 2801 2797 2802 /* Make sure to align the writable size to the guest's frame size. */2803 cbWritable = DrvAudioHlpBytesAlign(cbWritable, &pStream-> Guest.Cfg.Props);2798 /* Make sure to align the writable size to the host's frame size. */ 2799 cbWritable = DrvAudioHlpBytesAlign(cbWritable, &pStream->Host.Cfg.Props); 2804 2800 } 2805 2801
Note:
See TracChangeset
for help on using the changeset viewer.

