Changeset 73611 in vbox
- Timestamp:
- Aug 10, 2018 8:51:03 AM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124255
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvAudio.cpp
r73593 r73611 2183 2183 2184 2184 /* Buffering stuff. */ 2185 CFGMR3QueryU32Def(pNode, "Period Ms", &pCfg->uPeriodMs, 0);2186 CFGMR3QueryU32Def(pNode, "BufferSizeMs", &pCfg->uBufferSizeMs, 0);2187 CFGMR3QueryU32Def(pNode, "PreBuffer Ms", &pCfg->uPreBufMs, UINT32_MAX /* No custom value set */);2188 2189 LogFunc(("pCfg=%p, uPeriod Ms=%RU32, uBufferSizeMs=%RU32, uPreBufMs=%RU32\n",2190 pCfg, pCfg->uPeriod Ms, pCfg->uBufferSizeMs, pCfg->uPreBufMs));2185 CFGMR3QueryU32Def(pNode, "PeriodSizeMs", &pCfg->uPeriodSizeMs, 0); 2186 CFGMR3QueryU32Def(pNode, "BufferSizeMs", &pCfg->uBufferSizeMs, 0); 2187 CFGMR3QueryU32Def(pNode, "PreBufferSizeMs", &pCfg->uPreBufSizeMs, UINT32_MAX /* No custom value set */); 2188 2189 LogFunc(("pCfg=%p, uPeriodSizeMs=%RU32, uBufferSizeMs=%RU32, uPreBufSizeMs=%RU32\n", 2190 pCfg, pCfg->uPeriodSizeMs, pCfg->uBufferSizeMs, pCfg->uPreBufSizeMs)); 2191 2191 2192 2192 return VINF_SUCCESS; … … 2938 2938 * Period size 2939 2939 */ 2940 if (pDrvCfg->uPeriod Ms)2941 pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(pDrvCfg->uPeriod Ms, &pCfgReq->Props);2940 if (pDrvCfg->uPeriodSizeMs) 2941 pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(pDrvCfg->uPeriodSizeMs, &pCfgReq->Props); 2942 2942 else /* Set default period size. */ 2943 2943 pCfgReq->Backend.cfPeriod = DrvAudioHlpMilliToFrames(200 /* ms */, &pCfgReq->Props); 2944 2944 2945 2945 LogRel2(("Audio: Using %s period size (%RU64ms, %RU32 frames) for stream '%s'\n", 2946 pDrvCfg->uPeriod Ms ? "custom" : "default", DrvAudioHlpFramesToMilli(pCfgReq->Backend.cfPeriod, &pCfgReq->Props),2946 pDrvCfg->uPeriodSizeMs ? "custom" : "default", DrvAudioHlpFramesToMilli(pCfgReq->Backend.cfPeriod, &pCfgReq->Props), 2947 2947 pCfgReq->Backend.cfPeriod, pStream->szName)); 2948 2948 … … 2962 2962 * Pre-buffering size 2963 2963 */ 2964 if (pDrvCfg->uPreBuf Ms != UINT32_MAX)2965 { 2966 if (!pDrvCfg->uPreBuf Ms) /* Pre-buffering is set to disabled. */2964 if (pDrvCfg->uPreBufSizeMs != UINT32_MAX) 2965 { 2966 if (!pDrvCfg->uPreBufSizeMs) /* Pre-buffering is set to disabled. */ 2967 2967 LogRel2(("Audio: Using custom pre-buffering (disabled) for stream '%s'\n", pStream->szName)); 2968 pCfgReq->Backend.cfPreBuf = DrvAudioHlpMilliToFrames(pDrvCfg->uPreBuf Ms, &pCfgReq->Props);2968 pCfgReq->Backend.cfPreBuf = DrvAudioHlpMilliToFrames(pDrvCfg->uPreBufSizeMs, &pCfgReq->Props); 2969 2969 } 2970 2970 else /* Set default pre-buffering size. */ … … 2972 2972 2973 2973 LogRel2(("Audio: Using %s pre-buffering size (%RU64ms, %RU32 frames) for stream '%s'\n", 2974 pDrvCfg->uPreBuf Ms != UINT32_MAX ? "custom" : "default", DrvAudioHlpFramesToMilli(pCfgReq->Backend.cfPreBuf, &pCfgReq->Props),2974 pDrvCfg->uPreBufSizeMs != UINT32_MAX ? "custom" : "default", DrvAudioHlpFramesToMilli(pCfgReq->Backend.cfPreBuf, &pCfgReq->Props), 2975 2975 pCfgReq->Backend.cfPreBuf, pStream->szName)); 2976 2976 … … 3034 3034 } 3035 3035 3036 if ( pDrvCfg->uPeriod Ms3036 if ( pDrvCfg->uPeriodSizeMs 3037 3037 && pCfgAcq->Backend.cfPeriod != pCfgReq->Backend.cfPeriod) 3038 3038 { … … 3041 3041 } 3042 3042 3043 if ( pDrvCfg->uPreBuf Ms != UINT32_MAX3043 if ( pDrvCfg->uPreBufSizeMs != UINT32_MAX 3044 3044 && pCfgAcq->Backend.cfPreBuf != pCfgReq->Backend.cfPreBuf) 3045 3045 { -
trunk/src/VBox/Devices/Audio/DrvAudio.h
r73467 r73611 82 82 * This value reflects the time in between each hardware interrupt on the 83 83 * backend (host) side. */ 84 uint32_t uPeriod Ms;84 uint32_t uPeriodSizeMs; 85 85 /** Configures the (ring) buffer size (in ms). Often is a multiple of uPeriodMs. */ 86 86 uint32_t uBufferSizeMs; … … 90 90 * Set to 0 to disable pre-buffering completely. 91 91 * By default set to UINT32_MAX if not set to a custom value. */ 92 uint32_t uPreBuf Ms;92 uint32_t uPreBufSizeMs; 93 93 /** The driver's debugging configuration. */ 94 94 struct -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r73308 r73611 3497 3497 } 3498 3498 3499 InsertConfigInteger(pCfg, "Period Ms",3500 i_getAudioDriverValU32(pVirtualBox, pMachine, pszDrvName, "Period Ms", 0 /* Default */));3499 InsertConfigInteger(pCfg, "PeriodSizeMs", 3500 i_getAudioDriverValU32(pVirtualBox, pMachine, pszDrvName, "PeriodSizeMs", 0 /* Default */)); 3501 3501 InsertConfigInteger(pCfg, "BufferSizeMs", 3502 3502 i_getAudioDriverValU32(pVirtualBox, pMachine, pszDrvName, "BufferSizeMs", 0 /* Default */)); 3503 InsertConfigInteger(pCfg, "PreBuffer Ms",3504 i_getAudioDriverValU32(pVirtualBox, pMachine, pszDrvName, "PreBuffer Ms", UINT32_MAX /* Default */));3503 InsertConfigInteger(pCfg, "PreBufferSizeMs", 3504 i_getAudioDriverValU32(pVirtualBox, pMachine, pszDrvName, "PreBufferSizeMs", UINT32_MAX /* Default */)); 3505 3505 3506 3506 PCFGMNODE pLunL1;
Note:
See TracChangeset
for help on using the changeset viewer.