Changeset 57397 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- Aug 17, 2015 3:13:40 PM (9 years ago)
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r56648 r57397 21 21 /* 22 22 * DEBUG_DUMP_PCM_DATA enables dumping the raw PCM data 23 * to a file on the host. Be sure to adjust the dumping path23 * to a file on the host. Be sure to adjust DEBUG_DUMP_PCM_DATA_PATH 24 24 * to your needs before using this! 25 25 */ 26 26 #ifdef DEBUG 27 27 //# define DEBUG_DUMP_PCM_DATA 28 # define DEBUG_DUMP_PCM_DATA_PATH "c:\\temp\\" 28 29 #endif 29 30 … … 213 214 214 215 return rc; 216 } 217 218 /** 219 * Clears the entire sample buffer. 220 * 221 * @param pMixBuf Mixing buffer to clear. 222 * 223 */ 224 void AudioMixBufClear(PPDMAUDIOMIXBUF pMixBuf) 225 { 226 AssertPtrReturnVoid(pMixBuf); 227 228 if (pMixBuf->cSamples) 229 RT_BZERO(pMixBuf->pSamples, pMixBuf->cSamples * sizeof(PDMAUDIOSAMPLE)); 215 230 } 216 231 … … 1330 1345 #ifdef DEBUG_DUMP_PCM_DATA 1331 1346 RTFILE fh; 1332 rc = RTFileOpen(&fh, "c:\\temp\\mixbuf_readcirc.pcm",1347 rc = RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_readcirc.pcm", 1333 1348 RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE); 1334 1349 if (RT_SUCCESS(rc)) … … 1370 1385 pMixBuf->cProcessed = 0; 1371 1386 1372 if (pMixBuf->cSamples) 1373 RT_BZERO(pMixBuf->pSamples, pMixBuf->cSamples * sizeof(PDMAUDIOSAMPLE)); 1387 AudioMixBufClear(pMixBuf); 1374 1388 } 1375 1389 … … 1533 1547 #ifdef DEBUG_DUMP_PCM_DATA 1534 1548 RTFILE fh; 1535 rc = RTFileOpen(&fh, "c:\\temp\\mixbuf_writeat.pcm",1549 rc = RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_writeat.pcm", 1536 1550 RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE); 1537 1551 if (RT_SUCCESS(rc)) … … 1686 1700 #ifdef DEBUG_DUMP_PCM_DATA 1687 1701 RTFILE fh; 1688 RTFileOpen(&fh, "c:\\temp\\mixbuf_writeex.pcm",1702 RTFileOpen(&fh, DEBUG_DUMP_PCM_DATA_PATH "mixbuf_writeex.pcm", 1689 1703 RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE); 1690 1704 RTFileWrite(fh, pSamplesDst1, AUDIOMIXBUF_S2B(pMixBuf, cLenDst1), NULL); -
trunk/src/VBox/Devices/Audio/AudioMixBuffer.h
r55920 r57397 52 52 int AudioMixBufAcquire(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead, PPDMAUDIOSAMPLE *ppvSamples, uint32_t *pcSamplesRead); 53 53 inline uint32_t AudioMixBufBytesToSamples(PPDMAUDIOMIXBUF pMixBuf); 54 void AudioMixBufClear(PPDMAUDIOMIXBUF pMixBuf); 54 55 void AudioMixBufDestroy(PPDMAUDIOMIXBUF pMixBuf); 55 56 void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear);
Note:
See TracChangeset
for help on using the changeset viewer.