Changeset 88002 in vbox
- Timestamp:
- Mar 8, 2021 11:28:46 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143125
- Location:
- trunk/src/VBox
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r87994 r88002 656 656 if (RT_SUCCESS(rc)) 657 657 { 658 rc = RTCircBufCreate(&pMixStream->pCircBuf, DrvAudioHlpMilliToBytes( 100 /* ms */, &pSink->PCMProps)); /** @todo Make this configurable. */658 rc = RTCircBufCreate(&pMixStream->pCircBuf, DrvAudioHlpMilliToBytes(&pSink->PCMProps, 100 /*ms*/)); /** @todo Make this configurable. */ 659 659 AssertRC(rc); 660 660 } … … 1495 1495 AudioMixBufDestroy(&pSink->MixBuf); 1496 1496 rc = AudioMixBufInit(&pSink->MixBuf, pSink->pszName, &pSink->PCMProps, 1497 DrvAudioHlpMilliToFrames( 100 /* ms */, &pSink->PCMProps)); /** @todo Make this configurable? */1497 DrvAudioHlpMilliToFrames(&pSink->PCMProps, 100 /*ms*/)); /** @todo Make this configurable? */ 1498 1498 if (RT_SUCCESS(rc)) 1499 1499 { -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r87991 r88002 2228 2228 } 2229 2229 2230 rc = RTCircBufCreate(&pStreamCC->State.pCircBuf, DrvAudioHlpMilliToBytes( 100 /* ms */, &Cfg.Props)); /** @todo Make this configurable. */2230 rc = RTCircBufCreate(&pStreamCC->State.pCircBuf, DrvAudioHlpMilliToBytes(&Cfg.Props, 100 /*ms*/)); /** @todo Make this configurable. */ 2231 2231 if (RT_SUCCESS(rc)) 2232 2232 { -
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r87993 r88002 668 668 LogRel2(("Audio: Stream '%s' got a scheduling hint of %RU32ms (%RU32 bytes)\n", 669 669 pStream->szName, pCfgGuest->Device.cMsSchedulingHint, 670 DrvAudioHlpMilliToBytes( pCfgGuest->Device.cMsSchedulingHint, &pCfgGuest->Props)));670 DrvAudioHlpMilliToBytes(&pCfgGuest->Props, pCfgGuest->Device.cMsSchedulingHint))); 671 671 672 672 /* Destroy any former mixing buffer. */ … … 1544 1544 #endif 1545 1545 const uint64_t tsDeltaPlayedCapturedNs = RTTimeNanoTS() - pStream->tsLastPlayedCapturedNs; 1546 const uint32_t cfPassedReal = DrvAudioHlpNanoToFrames( tsDeltaPlayedCapturedNs, &pStream->Host.Cfg.Props);1546 const uint32_t cfPassedReal = DrvAudioHlpNanoToFrames(&pStream->Host.Cfg.Props, tsDeltaPlayedCapturedNs); 1547 1547 1548 1548 const uint32_t cFramesPeriod = pStream->Host.Cfg.Backend.cFramesPeriod; … … 1614 1614 /* Did we reach/pass (in real time) the device scheduling slot? 1615 1615 * Play as much as we can write to the backend then. */ 1616 if (cfPassedReal >= DrvAudioHlpMilliToFrames( pStream->Guest.Cfg.Device.cMsSchedulingHint, &pStream->Host.Cfg.Props))1616 if (cfPassedReal >= DrvAudioHlpMilliToFrames(&pStream->Host.Cfg.Props, pStream->Guest.Cfg.Device.cMsSchedulingHint)) 1617 1617 cfToPlay = cfWritable; 1618 1618 } … … 1652 1652 "-> cfToPlay=%RU32 (%RU64ms), cfPlayed=%RU32 (%RU64ms)\n", 1653 1653 pStream->szName, fJustStarted, 1654 DrvAudioHlpMilliToFrames( pStream->Guest.Cfg.Device.cMsSchedulingHint, &pStream->Host.Cfg.Props),1654 DrvAudioHlpMilliToFrames(&pStream->Host.Cfg.Props, pStream->Guest.Cfg.Device.cMsSchedulingHint), 1655 1655 pStream->Guest.Cfg.Device.cMsSchedulingHint, 1656 1656 cfPassedReal, DrvAudioHlpFramesToMilli(&pStream->Host.Cfg.Props, cfPassedReal), … … 2966 2966 || fDisabled) 2967 2967 { 2968 cbReadable = DrvAudioHlpNanoToBytes(RTTimeNanoTS() - pStream->tsLastReadWrittenNs, 2969 &pStream->Host.Cfg.Props); 2968 cbReadable = DrvAudioHlpNanoToBytes(&pStream->Host.Cfg.Props, RTTimeNanoTS() - pStream->tsLastReadWrittenNs); 2970 2969 if (!(pStream->fWarningsShown & PDMAUDIOSTREAM_WARN_FLAGS_DISABLED)) 2971 2970 { … … 3218 3217 if (pDrvCfg->uPeriodSizeMs) 3219 3218 { 3220 pCfgReq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames( pDrvCfg->uPeriodSizeMs, &pCfgReq->Props);3219 pCfgReq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(&pCfgReq->Props, pDrvCfg->uPeriodSizeMs); 3221 3220 RTStrPrintf(szWhat, sizeof(szWhat), "custom"); 3222 3221 } … … 3224 3223 if (!pCfgReq->Backend.cFramesPeriod) /* Set default period size if nothing explicitly is set. */ 3225 3224 { 3226 pCfgReq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames( 150 /* ms */, &pCfgReq->Props);3225 pCfgReq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(&pCfgReq->Props, 150 /*ms*/); 3227 3226 RTStrPrintf(szWhat, sizeof(szWhat), "default"); 3228 3227 } … … 3237 3236 if (pDrvCfg->uBufferSizeMs) 3238 3237 { 3239 pCfgReq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames( pDrvCfg->uBufferSizeMs, &pCfgReq->Props);3238 pCfgReq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(&pCfgReq->Props, pDrvCfg->uBufferSizeMs); 3240 3239 RTStrPrintf(szWhat, sizeof(szWhat), "custom"); 3241 3240 } … … 3243 3242 if (!pCfgReq->Backend.cFramesBufferSize) /* Set default buffer size if nothing explicitly is set. */ 3244 3243 { 3245 pCfgReq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames( 300 /* ms */, &pCfgReq->Props);3244 pCfgReq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(&pCfgReq->Props, 300 /*ms*/); 3246 3245 RTStrPrintf(szWhat, sizeof(szWhat), "default"); 3247 3246 } … … 3256 3255 if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) /* Anything set via global / per-VM extra-data? */ 3257 3256 { 3258 pCfgReq->Backend.cFramesPreBuffering = DrvAudioHlpMilliToFrames( pDrvCfg->uPreBufSizeMs, &pCfgReq->Props);3257 pCfgReq->Backend.cFramesPreBuffering = DrvAudioHlpMilliToFrames(&pCfgReq->Props, pDrvCfg->uPreBufSizeMs); 3259 3258 RTStrPrintf(szWhat, sizeof(szWhat), "custom"); 3260 3259 } -
trunk/src/VBox/Devices/Audio/DrvAudio.h
r87994 r88002 207 207 uint64_t DrvAudioHlpFramesToMilli(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames); 208 208 uint64_t DrvAudioHlpFramesToNano(PCPDMAUDIOPCMPROPS pProps, uint32_t cFrames); 209 uint32_t DrvAudioHlpMilliToBytes( uint64_t uMs, PCPDMAUDIOPCMPROPS pProps);210 uint32_t DrvAudioHlpNanoToBytes( uint64_t uNs, PCPDMAUDIOPCMPROPS pProps);211 uint32_t DrvAudioHlpMilliToFrames( uint64_t uMs, PCPDMAUDIOPCMPROPS pProps);212 uint32_t DrvAudioHlpNanoToFrames( uint64_t uNs, PCPDMAUDIOPCMPROPS pProps);209 uint32_t DrvAudioHlpMilliToBytes(PCPDMAUDIOPCMPROPS pProps, uint64_t cMs); 210 uint32_t DrvAudioHlpNanoToBytes(PCPDMAUDIOPCMPROPS pProps, uint64_t cNs); 211 uint32_t DrvAudioHlpMilliToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cMs); 212 uint32_t DrvAudioHlpNanoToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cNs); 213 213 /** @} */ 214 214 -
trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
r87998 r88002 1362 1362 1363 1363 /** 1364 * Returns the amount of bytes for a given time (in ms) and PCM properties.1365 * 1366 * Note: The result will return an amount of bytes which is aligned to the audio frame size.1367 * 1368 * @ return uint32_t Calculated amount of bytes.1369 * @param uMs Time (in ms) to calculate amount of bytes for.1370 * @ param pProps PCM properties to calculate amount of bytes for.1371 */ 1372 uint32_t DrvAudioHlpMilliTo Bytes(uint64_t uMs, PCPDMAUDIOPCMPROPS pProps)1364 * Converts milliseconds to frames. 1365 * 1366 * @returns Number of frames 1367 * @param pProps The PCM properties to use. 1368 * @param cMs The number of milliseconds to convert. 1369 * 1370 * @note The result is rounded rather than floored (hysterical raisins). 1371 */ 1372 uint32_t DrvAudioHlpMilliToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cMs) 1373 1373 { 1374 1374 AssertPtrReturn(pProps, 0); 1375 1375 1376 if (!uMs) 1377 return 0; 1378 1379 const uint32_t uBytesPerFrame = DrvAudioHlpPCMPropsBytesPerFrame(pProps); 1380 1381 uint32_t uBytes = ((double)drvAudioHlpBytesPerSec(pProps) / (double)RT_MS_1SEC) * uMs; 1382 if (uBytes % uBytesPerFrame) /* Any remainder? Make the returned bytes an integral number to the given frames. */ 1383 uBytes = uBytes + (uBytesPerFrame - uBytes % uBytesPerFrame); 1384 1385 Assert(uBytes % uBytesPerFrame == 0); /* Paranoia. */ 1386 1387 return uBytes; 1388 } 1389 1390 /** 1391 * Returns the amount of bytes for a given time (in ns) and PCM properties. 1392 * 1393 * Note: The result will return an amount of bytes which is aligned to the audio frame size. 1394 * 1395 * @return uint32_t Calculated amount of bytes. 1396 * @param uNs Time (in ns) to calculate amount of bytes for. 1397 * @param pProps PCM properties to calculate amount of bytes for. 1398 */ 1399 uint32_t DrvAudioHlpNanoToBytes(uint64_t uNs, PCPDMAUDIOPCMPROPS pProps) 1376 uint32_t const uHz = pProps->uHz; 1377 uint32_t cFrames; 1378 if (cMs < RT_MS_1SEC) 1379 cFrames = 0; 1380 else 1381 { 1382 cFrames = cMs / RT_MS_1SEC * uHz; 1383 cMs %= RT_MS_1SEC; 1384 } 1385 cFrames += (ASMMult2xU32RetU64(uHz, (uint32_t)cMs) + RT_MS_1SEC - 1) / RT_MS_1SEC; 1386 return cFrames; 1387 } 1388 1389 /** 1390 * Converts milliseconds to bytes. 1391 * 1392 * @returns Number of bytes (frame aligned). 1393 * @param pProps The PCM properties to use. 1394 * @param cMs The number of milliseconds to convert. 1395 * 1396 * @note The result is rounded rather than floored (hysterical raisins). 1397 */ 1398 uint32_t DrvAudioHlpMilliToBytes(PCPDMAUDIOPCMPROPS pProps, uint64_t cMs) 1399 { 1400 return PDMAUDIOPCMPROPS_F2B(pProps, DrvAudioHlpMilliToFrames(pProps, cMs)); 1401 } 1402 1403 /** 1404 * Converts nanoseconds to frames. 1405 * 1406 * @returns Number of frames 1407 * @param pProps The PCM properties to use. 1408 * @param cNs The number of nanoseconds to convert. 1409 * 1410 * @note The result is rounded rather than floored (hysterical raisins). 1411 */ 1412 uint32_t DrvAudioHlpNanoToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cNs) 1400 1413 { 1401 1414 AssertPtrReturn(pProps, 0); 1402 1415 1403 if (!uNs) 1404 return 0; 1405 1406 const uint32_t uBytesPerFrame = DrvAudioHlpPCMPropsBytesPerFrame(pProps); 1407 1408 uint32_t uBytes = ((double)drvAudioHlpBytesPerSec(pProps) / (double)RT_NS_1SEC) * uNs; 1409 if (uBytes % uBytesPerFrame) /* Any remainder? Make the returned bytes an integral number to the given frames. */ 1410 uBytes = uBytes + (uBytesPerFrame - uBytes % uBytesPerFrame); 1411 1412 Assert(uBytes % uBytesPerFrame == 0); /* Paranoia. */ 1413 1414 return uBytes; 1415 } 1416 1417 /** 1418 * Returns the amount of audio frames for a given time (in ms) and PCM properties. 1419 * 1420 * @return uint32_t Calculated amount of audio frames. 1421 * @param uMs Time (in ms) to calculate amount of frames for. 1422 * @param pProps PCM properties to calculate amount of frames for. 1423 */ 1424 uint32_t DrvAudioHlpMilliToFrames(uint64_t uMs, PCPDMAUDIOPCMPROPS pProps) 1425 { 1426 AssertPtrReturn(pProps, 0); 1427 1428 const uint32_t cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */); 1429 if (!cbFrame) /* Prevent division by zero. */ 1430 return 0; 1431 1432 return DrvAudioHlpMilliToBytes(uMs, pProps) / cbFrame; 1433 } 1434 1435 /** 1436 * Returns the amount of audio frames for a given time (in ns) and PCM properties. 1437 * 1438 * @return uint32_t Calculated amount of audio frames. 1439 * @param uNs Time (in ns) to calculate amount of frames for. 1440 * @param pProps PCM properties to calculate amount of frames for. 1441 */ 1442 uint32_t DrvAudioHlpNanoToFrames(uint64_t uNs, PCPDMAUDIOPCMPROPS pProps) 1443 { 1444 AssertPtrReturn(pProps, 0); 1445 1446 const uint32_t cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */); 1447 if (!cbFrame) /* Prevent division by zero. */ 1448 return 0; 1449 1450 return DrvAudioHlpNanoToBytes(uNs, pProps) / cbFrame; 1416 uint32_t const uHz = pProps->uHz; 1417 uint32_t cFrames; 1418 if (cNs < RT_NS_1SEC) 1419 cFrames = 0; 1420 else 1421 { 1422 cFrames = cNs / RT_NS_1SEC * uHz; 1423 cNs %= RT_NS_1SEC; 1424 } 1425 cFrames += (ASMMult2xU32RetU64(uHz, (uint32_t)cNs) + RT_NS_1SEC - 1) / RT_NS_1SEC; 1426 return cFrames; 1427 } 1428 1429 /** 1430 * Converts nanoseconds to bytes. 1431 * 1432 * @returns Number of bytes (frame aligned). 1433 * @param pProps The PCM properties to use. 1434 * @param cNs The number of nanoseconds to convert. 1435 * 1436 * @note The result is rounded rather than floored (hysterical raisins). 1437 */ 1438 uint32_t DrvAudioHlpNanoToBytes(PCPDMAUDIOPCMPROPS pProps, uint64_t cNs) 1439 { 1440 return PDMAUDIOPCMPROPS_F2B(pProps, DrvAudioHlpNanoToFrames(pProps, cNs)); 1451 1441 } 1452 1442 -
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r87994 r88002 1039 1039 req.freq = pCfgReq->Props.uHz; 1040 1040 req.nchannels = pCfgReq->Props.cChannels; 1041 req.period_size = DrvAudioHlpMilliToFrames( 50 /* ms */, &pCfgReq->Props); /** @todo Make this configurable. */1041 req.period_size = DrvAudioHlpMilliToFrames(&pCfgReq->Props, 50 /*ms*/); /** @todo Make this configurable. */ 1042 1042 req.buffer_size = req.period_size * 2; /** @todo Make this configurable. */ 1043 1043 req.threshold = req.period_size; -
trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
r87861 r88002 349 349 AssertPtr(pStreamDbg->pCfg); 350 350 351 return DrvAudioHlpMilliToBytes( 10 /* ms */, &pStreamDbg->pCfg->Props);351 return DrvAudioHlpMilliToBytes(&pStreamDbg->pCfg->Props, 10 /*ms*/); 352 352 } 353 353 -
trunk/src/VBox/Devices/Audio/HDAStream.cpp
r87991 r88002 456 456 457 457 /* Audio data per second the stream needs. */ 458 const uint32_t cbDataPerSec = DrvAudioHlpMilliToBytes( RT_MS_1SEC, &pStreamR3->State.Mapping.PCMProps);458 const uint32_t cbDataPerSec = DrvAudioHlpMilliToBytes(&pStreamR3->State.Mapping.PCMProps, RT_MS_1SEC); 459 459 460 460 /* This is used to indicate whether we're done or should the uTimerIoHz as fallback. */ … … 698 698 * channels we don't support / need to save space. 699 699 */ 700 uint32_t cbCircBuf = DrvAudioHlpMilliToBytes( RT_MS_1SEC * 6 / RT_MIN(uTransferHz, pStreamShared->State.uTimerIoHz),701 &pCfg->Props);700 uint32_t cbCircBuf = DrvAudioHlpMilliToBytes(&pCfg->Props, 701 RT_MS_1SEC * 6 / RT_MIN(uTransferHz, pStreamShared->State.uTimerIoHz)); 702 702 LogRel2(("HDA: Stream #%RU8 default ring buffer size is %RU32 bytes / %RU64 ms\n", 703 703 uSD, cbCircBuf, DrvAudioHlpBytesToMilli(&pCfg->Props, cbCircBuf))); … … 706 706 if (msCircBufCfg) /* Anything set via CFGM? */ 707 707 { 708 cbCircBuf = DrvAudioHlpMilliToBytes( msCircBufCfg, &pCfg->Props);708 cbCircBuf = DrvAudioHlpMilliToBytes(&pCfg->Props, msCircBufCfg); 709 709 LogRel2(("HDA: Stream #%RU8 is using a custom ring buffer size of %RU32 bytes / %RU64 ms\n", 710 710 uSD, cbCircBuf, DrvAudioHlpBytesToMilli(&pCfg->Props, cbCircBuf))); -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r87997 r88002 35 35 static void tstBasics(RTTEST hTest) 36 36 { 37 RTTestSub(hTest, " Single buffer");37 RTTestSub(hTest, "Basics"); 38 38 39 39 static const PDMAUDIOPCMPROPS s_Cfg441StereoS16 = PDMAUDIOPCMPROPS_INITIALIZOR( … … 104 104 RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToMilli(&s_Cfg441StereoS16, 44100)) == RT_MS_1SEC, ("ms=%RU64\n", u64)); 105 105 RTTESTI_CHECK_MSG((u64 = DrvAudioHlpFramesToMilli(&s_Cfg441StereoS16, 255)) == 5, ("ms=%RU64\n", u64)); 106 107 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpNanoToFrames(&s_Cfg441StereoS16, RT_NS_1SEC)) == 44100, ("cb=%RU32\n", u32)); 108 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpNanoToFrames(&s_Cfg441StereoS16, 215876)) == 10, ("cb=%RU32\n", u32)); 109 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpMilliToFrames(&s_Cfg441StereoS16, RT_MS_1SEC)) == 44100, ("cb=%RU32\n", u32)); 110 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpMilliToFrames(&s_Cfg441StereoU32, 6)) == 265, ("cb=%RU32\n", u32)); 111 112 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpNanoToBytes(&s_Cfg441StereoS16, RT_NS_1SEC)) == 44100*2*2, ("cb=%RU32\n", u32)); 113 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpNanoToBytes(&s_Cfg441StereoS16, 702947)) == 31*2*2, ("cb=%RU32\n", u32)); 114 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpMilliToBytes(&s_Cfg441StereoS16, RT_MS_1SEC)) == 44100*2*2, ("cb=%RU32\n", u32)); 115 RTTESTI_CHECK_MSG((u32 = DrvAudioHlpMilliToBytes(&s_Cfg441StereoS16, 5)) == 884, ("cb=%RU32\n", u32)); 106 116 107 117 /* DrvAudioHlpClearBuf: */ -
trunk/src/VBox/Main/src-client/DrvAudioRec.cpp
r87995 r88002 553 553 554 554 /* Every Opus frame marks a period for now. Optimize this later. */ 555 pCfgAcq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(pSink->Codec.Opus.msFrame, &pCfgAcq->Props);556 pCfgAcq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(100 /* ms */, &pCfgAcq->Props); /** @todo Make this configurable. */557 pCfgAcq->Backend.cFramesPreBuffering 555 pCfgAcq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(&pCfgAcq->Props, pSink->Codec.Opus.msFrame); 556 pCfgAcq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(&pCfgAcq->Props, 100 /*ms*/); /** @todo Make this configurable. */ 557 pCfgAcq->Backend.cFramesPreBuffering = pCfgAcq->Backend.cFramesPeriod * 2; 558 558 } 559 559 } -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r87995 r88002 93 93 94 94 /* According to the VRDP docs, the VRDP server stores audio in 200ms chunks. */ 95 const uint32_t cFramesVrdpServer = DrvAudioHlpMilliToFrames( 200 /* ms */, &pCfgAcq->Props);95 const uint32_t cFramesVrdpServer = DrvAudioHlpMilliToFrames(&pCfgAcq->Props, 200 /*ms*/); 96 96 97 97 int rc = RTCircBufCreate(&pStreamVRDE->In.pCircBuf, DrvAudioHlpFramesToBytes(&pCfgAcq->Props, cFramesVrdpServer)); … … 137 137 138 138 /* According to the VRDP docs, the VRDP server stores audio in 200ms chunks. */ 139 pCfgAcq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(20 /* ms */, &pCfgAcq->Props);140 pCfgAcq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(100 /* ms */, &pCfgAcq->Props);141 pCfgAcq->Backend.cFramesPreBuffering 139 pCfgAcq->Backend.cFramesPeriod = DrvAudioHlpMilliToFrames(&pCfgAcq->Props, 20 /*ms*/); 140 pCfgAcq->Backend.cFramesBufferSize = DrvAudioHlpMilliToFrames(&pCfgAcq->Props, 100 /*ms*/); 141 pCfgAcq->Backend.cFramesPreBuffering = pCfgAcq->Backend.cFramesPeriod * 2; 142 142 } 143 143 … … 174 174 { 175 175 rc = pDrv->pConsoleVRDPServer->SendAudioInputBegin(NULL, pStreamVRDE, 176 DrvAudioHlpMilliToFrames( 200 /* ms */, &pStreamVRDE->pCfg->Props),176 DrvAudioHlpMilliToFrames(&pStreamVRDE->pCfg->Props, 200 /*ms*/), 177 177 pStreamVRDE->pCfg->Props.uHz, pStreamVRDE->pCfg->Props.cChannels, 178 178 pStreamVRDE->pCfg->Props.cbSample * 8 /* Bit */);
Note:
See TracChangeset
for help on using the changeset viewer.