- Timestamp:
- Aug 6, 2018 12:28:13 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r73522 r73524 2799 2799 AssertMsg(pStream->enmDir == PDMAUDIODIR_OUT, ("Can't write to a non-output stream\n")); 2800 2800 2801 /* As the host side sets the overall pace, return the writable bytes from that side. */2802 const uint64_t deltaLastReadWriteNs = RTTimeNanoTS() - pStream->tsLastReadWrittenNs;2803 2804 2801 uint32_t cbWritable = 0; 2805 2802 2806 2803 if (DrvAudioHlpStreamStatusCanWrite(pStream->fStatus)) 2807 2804 { 2808 cbWritable = DrvAudioHlpNanoToBytes(deltaLastReadWriteNs, &pStream->Host.Cfg.Props);2805 cbWritable = AudioMixBufFreeBytes(&pStream->Host.MixBuf); 2809 2806 2810 2807 /* Make sure to align the writable size to the guest's frame size. */ … … 2812 2809 } 2813 2810 2814 Log3Func(("[%s] cbWritable=%RU32 (%RU64ms)\n", pStream->szName, cbWritable, deltaLastReadWriteNs / RT_NS_1MS_64)); 2811 Log3Func(("[%s] cbWritable=%RU32 (%RU64ms2)\n", 2812 pStream->szName, cbWritable, DrvAudioHlpBytesToMilli(cbWritable, &pStream->Host.Cfg.Props))); 2815 2813 2816 2814 rc2 = RTCritSectLeave(&pThis->CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.