Changeset 89522 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Jun 5, 2021 1:54:59 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp
r89510 r89522 733 733 int fNegative = 0; 734 734 int rcPa = pa_stream_get_latency(pStream, &cUsLatency, &fNegative); 735 Log2Func(("Requesting %zu bytes; Latency: %'RU64 us%s\n", 736 cbLen, cUsLatency, rcPa == 0 ? " - pa_stream_get_latency failed!" : "")); 737 } 738 739 740 /** 741 * Debug PA callback: Underflow. This may happen when draing/corking. 735 Log2Func(("Requesting %zu bytes; Latency: %'RU64 us (rcPa=%d n=%d)\n", cbLen, cUsLatency, rcPa, fNegative)); 736 } 737 738 739 /** 740 * Debug PA callback: Underflow. This may happen when draining/corking. 742 741 */ 743 742 static void drvHstAudPaStreamUnderflowDebugCallback(pa_stream *pStream, void *pvContext) … … 750 749 LogRel2(("PulseAudio: Warning: Hit underflow #%RU32\n", pStrm->cUnderflows)); 751 750 751 # if 0 752 752 if ( pStrm->cUnderflows >= 6 /** @todo Make this check configurable. */ 753 753 && pStrm->cUsLatency < 2U*RT_US_1SEC) … … 766 766 pStrm->cUnderflows = 0; 767 767 } 768 # endif 768 769 769 770 pa_usec_t cUsLatency = 0; … … 788 789 789 790 /** 790 * Debug PA callback: Overflow. This may happen when drain g/corking.791 * Debug PA callback: Overflow. This may happen when draining/corking. 791 792 */ 792 793 static void drvHstAudPaStreamOverflowDebugCallback(pa_stream *pStream, void *pvContext) … … 1167 1168 pStreamPA->cUsLatency = PDMAudioPropsFramesToMicro(&pCfgAcq->Props, pCfgReq->Backend.cFramesBufferSize); 1168 1169 pStreamPA->BufAttr.tlength = pa_usec_to_bytes(pStreamPA->cUsLatency, &pStreamPA->SampleSpec); 1170 #if 0 /* bird: Bad bad idea. Messes up output via a "Intel Corporation 200 Series PCH HD Audio" 1171 device here on fedora-32. Just use the default instead. */ 1169 1172 pStreamPA->BufAttr.minreq = PDMAudioPropsFramesToBytes(&pCfgAcq->Props, pCfgReq->Backend.cFramesPeriod); 1173 #else 1174 pStreamPA->BufAttr.minreq = -1; 1175 #endif 1170 1176 pStreamPA->BufAttr.prebuf = pa_usec_to_bytes(PDMAudioPropsFramesToMicro(&pCfgAcq->Props, 1171 1177 pCfgReq->Backend.cFramesPreBuffering), … … 1657 1663 #ifdef LOG_ENABLED 1658 1664 const pa_usec_t tsNowUs = pa_rtclock_now(); 1659 Log3Func(("play delta: %'RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf)); 1665 Log3Func(("play delta: %'RI64 us; cbBuf=%#x\n", 1666 pStreamPA->tsLastReadWrittenUs ? tsNowUs - pStreamPA->tsLastReadWrittenUs : -1, cbBuf)); 1660 1667 pStreamPA->tsLastReadWrittenUs = tsNowUs; 1661 1668 #endif … … 1759 1766 #ifdef LOG_ENABLED 1760 1767 const pa_usec_t tsNowUs = pa_rtclock_now(); 1761 Log3Func(("capture delta: %'RU64 us; cbBuf=%#x\n", tsNowUs - pStreamPA->tsLastReadWrittenUs, cbBuf)); 1768 Log3Func(("capture delta: %'RI64 us; cbBuf=%#x\n", 1769 pStreamPA->tsLastReadWrittenUs ? tsNowUs - pStreamPA->tsLastReadWrittenUs : -1, cbBuf)); 1762 1770 pStreamPA->tsLastReadWrittenUs = tsNowUs; 1763 1771 #endif
Note:
See TracChangeset
for help on using the changeset viewer.