儲存庫 vbox 的更動 62967
- 時間撮記:
- 2016-8-4 上午10:18:22 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
r62966 r62967 64 64 PDMAUDIOSTREAM Stream; 65 65 uint64_t u64TicksLast; 66 uint64_t c sPlayBuffer;67 uint8_t *p u8PlayBuffer;66 uint64_t cMaxSamplesInPlayBuffer; 67 uint8_t *pbPlayBuffer; 68 68 } NULLAUDIOSTREAMOUT; 69 69 typedef NULLAUDIOSTREAMOUT *PNULLAUDIOSTREAMOUT; … … 152 152 cSamplesPlayed = cLive; 153 153 154 cSamplesPlayed = RT_MIN(cSamplesPlayed, pNullStream->csPlayBuffer); 155 156 uint32_t csRead = 0; 157 AudioMixBufReadCirc(&pStream->MixBuf, pNullStream->pu8PlayBuffer, AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesPlayed), &csRead); 158 AudioMixBufFinish(&pStream->MixBuf, csRead); 154 cSamplesPlayed = RT_MIN(cSamplesPlayed, pNullStream->cMaxSamplesInPlayBuffer); 155 156 uint32_t cSamplesToRead = 0; 157 AudioMixBufReadCirc(&pStream->MixBuf, pNullStream->pbPlayBuffer, 158 AUDIOMIXBUF_S2B(&pStream->MixBuf, cSamplesPlayed), &cSamplesToReadRead); 159 AudioMixBufFinish(&pStream->MixBuf, cSamplesToRead); 159 160 160 161 if (pcSamplesPlayed) 161 *pcSamplesPlayed = c sRead;162 *pcSamplesPlayed = cSamplesToRead; 162 163 163 164 return VINF_SUCCESS; … … 216 217 PNULLAUDIOSTREAMOUT pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMOUT, Stream); 217 218 pNullStream->u64TicksLast = 0; 218 pNullStream->c sPlayBuffer= _1K;219 pNullStream->p u8PlayBuffer = (uint8_t *)RTMemAlloc(_1K << pStream->Props.cShift);220 if (pNullStream->p u8PlayBuffer)219 pNullStream->cMaxSamplesInPlayBuffer = _1K; 220 pNullStream->pbPlayBuffer = (uint8_t *)RTMemAlloc(_1K << pStream->Props.cShift); 221 if (pNullStream->pbPlayBuffer) 221 222 { 222 223 if (pcSamples) 223 *pcSamples = pNullStream->c sPlayBuffer;224 *pcSamples = pNullStream->cMaxSamplesInPlayBuffer; 224 225 } 225 226 else … … 264 265 PNULLAUDIOSTREAMOUT pNullStream = RT_FROM_MEMBER(pStream, NULLAUDIOSTREAMOUT, Stream); 265 266 if ( pNullStream 266 && pNullStream->p u8PlayBuffer)267 && pNullStream->pbPlayBuffer) 267 268 { 268 RTMemFree(pNullStream->p u8PlayBuffer);269 pNullStream->p u8PlayBuffer = NULL;269 RTMemFree(pNullStream->pbPlayBuffer); 270 pNullStream->pbPlayBuffer = NULL; 270 271 } 271 272
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器