儲存庫 vbox 的更動 55650
- 時間撮記:
- 2015-5-4 下午02:49:21 (10 年 以前)
- svn:sync-xref-src-repo-rev:
- 100025
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r55269 r55650 216 216 AssertPtrReturn(pVRDEStrmOut, VERR_INVALID_POINTER); 217 217 218 /*219 * Just call the VRDP server with the data.220 */221 218 uint32_t live = drvAudioHstOutSamplesLive(pHstStrmOut, NULL /* pcStreamsLive */); 222 219 uint64_t now = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns); … … 224 221 uint64_t ticks_per_second = PDMDrvHlpTMGetVirtualFreq(pDrv->pDrvIns); 225 222 223 /* Minimize the rounding error: samples = int((ticks * freq) / ticks_per_second + 0.5). */ 226 224 uint32_t cSamplesPlayed = (int)((2 * ticks * pHstStrmOut->Props.uHz + ticks_per_second) / ticks_per_second / 2); 227 if (!cSamplesPlayed) 225 226 /* Don't play more than available. */ 227 if (cSamplesPlayed > live) 228 228 cSamplesPlayed = live; 229 230 /* Remember when samples were consumed. */ 231 pVRDEStrmOut->old_ticks = now; 229 232 230 233 VRDEAUDIOFORMAT format = VRDE_AUDIO_FMT_MAKE(pHstStrmOut->Props.uHz, … … 233 236 pHstStrmOut->Props.fSigned); 234 237 235 pVRDEStrmOut->old_ticks = now; 236 237 int cSamplesToSend = live; 238 239 /* if (!cSamplesToSend) 240 { 241 if (pcSamplesPlayed) 242 pcSamplesPlayed = 0; 243 244 return 0; 245 }*/ 238 int cSamplesToSend = cSamplesPlayed; 246 239 247 240 LogFlowFunc(("uFreq=%RU32, cChan=%RU8, cBits=%RU8, fSigned=%RTbool, enmFormat=%ld, cSamplesToSend=%RU32\n", … … 250 243 format, cSamplesToSend)); 251 244 245 /* 246 * Call the VRDP server with the data. 247 */ 252 248 uint32_t cReadTotal = 0; 253 249
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器