Changeset 88487 in vbox
- Timestamp:
- Apr 13, 2021 9:56:59 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostAudioPulseAudio.cpp
r88486 r88487 1030 1030 /* 1031 1031 * Set up buffer attributes according to the stream type. 1032 * 1033 * For output streams we configure pre-buffering as requested, since 1034 * there is little point in using a different size than DrvAudio. This 1035 * assumes that a 'drain' request will override the prebuf size. 1032 1036 */ 1033 pStreamPA->BufAttr.maxlength = -1; /* Let the PulseAudio server choose the biggest size it can handle. */1037 pStreamPA->BufAttr.maxlength = UINT32_MAX; /* Let the PulseAudio server choose the biggest size it can handle. */ 1034 1038 if (pCfgReq->enmDir == PDMAUDIODIR_IN) 1035 1039 { 1036 1040 pStreamPA->BufAttr.fragsize = PDMAudioPropsFramesToBytes(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod); 1037 LogFunc(("Requesting: BufAttr: fragsize=%RU32 maxlength=-1\n", pStreamPA->BufAttr.fragsize)); 1041 LogFunc(("Requesting: BufAttr: fragsize=%RU32\n", pStreamPA->BufAttr.fragsize)); 1042 /* (rlength, minreq and prebuf are playback only) */ 1038 1043 } 1039 1044 else … … 1041 1046 pStreamPA->cUsLatency = PDMAudioPropsFramesToMicro(&pCfgReq->Props, pCfgReq->Backend.cFramesBufferSize); 1042 1047 pStreamPA->BufAttr.tlength = pa_usec_to_bytes(pStreamPA->cUsLatency, &pStreamPA->SampleSpec); 1043 pStreamPA->BufAttr.prebuf = pStreamPA->BufAttr.tlength;1044 1048 pStreamPA->BufAttr.minreq = PDMAudioPropsFramesToBytes(&pCfgReq->Props, pCfgReq->Backend.cFramesPeriod); 1049 pStreamPA->BufAttr.prebuf = pa_usec_to_bytes(PDMAudioPropsFramesToMicro(&pCfgReq->Props, 1050 pCfgReq->Backend.cFramesPreBuffering), 1051 &pStreamPA->SampleSpec); 1052 /* (fragsize is capture only) */ 1045 1053 LogRel2(("PulseAudio: Initial output latency is %RU64 us (%RU32 bytes)\n", 1046 1054 pStreamPA->cUsLatency, pStreamPA->BufAttr.tlength)); … … 1073 1081 pCfgAcq->Backend.cFramesPeriod = PDMAudioPropsBytesToFrames(&pCfgAcq->Props, pStreamPA->BufAttr.minreq); 1074 1082 pCfgAcq->Backend.cFramesBufferSize = PDMAudioPropsBytesToFrames(&pCfgAcq->Props, pStreamPA->BufAttr.tlength); 1075 pCfgAcq->Backend.cFramesPreBuffering = PDMAudioPropsBytesToFrames(&pCfgAcq->Props, pStreamPA->BufAttr.prebuf); 1083 pCfgAcq->Backend.cFramesPreBuffering = pCfgReq->Backend.cFramesPreBuffering 1084 * pCfgAcq->Backend.cFramesBufferSize 1085 / RT_MAX(pCfgReq->Backend.cFramesBufferSize, 1); 1076 1086 } 1077 1087 PDMAudioStrmCfgCopy(&pStreamPA->Cfg, pCfgAcq);
Note:
See TracChangeset
for help on using the changeset viewer.

