Changeset 89351 in vbox for trunk/src/VBox/Devices/Audio
- Timestamp:
- May 28, 2021 12:13:29 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 144700
- Location:
- trunk/src/VBox/Devices/Audio
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r89350 r89351 845 845 846 846 /** 847 * Get the number of readable frames in the buffer.848 *849 * @returns Number of frames.850 * @param pMixBuf The mixing buffer.851 * @todo Exactly same as AudioMixBufUsed.852 */853 uint32_t AudioMixBufLive(PCAUDIOMIXBUF pMixBuf)854 {855 return AudioMixBufUsed(pMixBuf);856 }857 858 859 /**860 847 * Worker for AudioMixBufFree and AudioMixBufFreeBytes. 861 848 */ -
trunk/src/VBox/Devices/Audio/AudioMixBuffer.h
r89350 r89351 192 192 uint32_t AudioMixBufUsed(PCAUDIOMIXBUF pMixBuf); 193 193 uint32_t AudioMixBufUsedBytes(PCAUDIOMIXBUF pMixBuf); 194 uint32_t AudioMixBufLive(PCAUDIOMIXBUF pMixBuf);195 194 uint32_t AudioMixBufFree(PCAUDIOMIXBUF pMixBuf); 196 195 uint32_t AudioMixBufFreeBytes(PCAUDIOMIXBUF pMixBuf); -
trunk/src/VBox/Devices/Audio/AudioMixer.cpp
r89339 r89351 761 761 */ 762 762 uint32_t const cFramesDmaAndMixBuf = PDMAudioPropsBytesToFrames(&pSink->MixBuf.Props, cbDmaLeftToDrain) 763 + AudioMixBuf Live(&pSink->MixBuf);763 + AudioMixBufUsed(&pSink->MixBuf); 764 764 uint64_t const cNsToDrainMax = PDMAudioPropsFramesToNano(&pSink->MixBuf.Props, cFramesDmaAndMixBuf + cFramesStreamMax); 765 765 uint64_t const nsDeadline = cNsToDrainMax * 2; … … 1031 1031 if (pSink->fStatus & AUDMIXSINK_STS_RUNNING) 1032 1032 { 1033 uint32_t const cFrames = AudioMixBuf Live(&pSink->MixBuf);1033 uint32_t const cFrames = AudioMixBufUsed(&pSink->MixBuf); 1034 1034 cbReadable = PDMAudioPropsFramesToBytes(&pSink->PCMProps, cFrames); 1035 1035 } … … 1717 1717 static uint32_t audioMixerSinkUpdateOutputCalcFramesToRead(PAUDMIXSINK pSink, uint32_t *pcWritableStreams) 1718 1718 { 1719 uint32_t cFramesToRead = AudioMixBuf Live(&pSink->MixBuf); /* (to read from the mixing buffer) */1719 uint32_t cFramesToRead = AudioMixBufUsed(&pSink->MixBuf); /* (to read from the mixing buffer) */ 1720 1720 uint32_t cWritableStreams = 0; 1721 1721 PAUDMIXSTREAM pMixStream; … … 1784 1784 || AudioMixBufFree(&pSink->MixBuf) > 2) 1785 1785 Log3Func(("%s: cLiveFrames=%#x cFramesToRead=%#x cWritableStreams=%#x\n", pSink->pszName, 1786 AudioMixBuf Live(&pSink->MixBuf), cFramesToRead, cWritableStreams));1786 AudioMixBufUsed(&pSink->MixBuf), cFramesToRead, cWritableStreams)); 1787 1787 else 1788 1788 { … … 1830 1830 1831 1831 Log3Func(("%s: cLiveFrames=%#x cFramesToRead=%#x cWritableStreams=%#x cMarkedUnreliable=%#x cReliableStreams=%#x\n", 1832 pSink->pszName, AudioMixBuf Live(&pSink->MixBuf), cFramesToRead,1832 pSink->pszName, AudioMixBufUsed(&pSink->MixBuf), cFramesToRead, 1833 1833 cWritableStreams, cMarkedUnreliable, cReliableStreams)); 1834 1834 } -
trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
r89339 r89351 625 625 RTTESTI_CHECK_MSG_BREAK(cSrcFrames == cSrcFramesWritten, 626 626 ("cSrcFrames=%RU32 vs cSrcFramesWritten=%RU32 cLiveFrames=%RU32\n", 627 cSrcFrames, cSrcFramesWritten, AudioMixBuf Live(&MixBuf)));627 cSrcFrames, cSrcFramesWritten, AudioMixBufUsed(&MixBuf))); 628 628 AudioMixBufCommit(&MixBuf, cSrcFrames); 629 629 … … 664 664 */ 665 665 AudioMixBufAdvance(&MixBuf, cSrcFrames); 666 RTTESTI_CHECK(AudioMixBuf Live(&MixBuf) == 0);666 RTTESTI_CHECK(AudioMixBufUsed(&MixBuf) == 0); 667 667 } 668 668
Note:
See TracChangeset
for help on using the changeset viewer.