Changeset 61187 in vbox for trunk/src/VBox
- Timestamp:
- May 25, 2016 8:42:18 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
r61157 r61187 1741 1741 } 1742 1742 1743 PPDMAUDIOMIXBUF pParent = pMixBuf->pParent; 1744 1743 1745 AUDMIXBUF_LOG(("%s: enmFmt=%ld, pvBuf=%p, cbBuf=%RU32 (%RU32 samples)\n", 1744 1746 pMixBuf->pszName, enmFmt, pvBuf, cbBuf, AUDIOMIXBUF_B2S(pMixBuf, cbBuf))); 1747 1748 if ( pParent 1749 && pParent->cSamples <= pMixBuf->cMixed) 1750 { 1751 if (pcWritten) 1752 *pcWritten = 0; 1753 1754 AUDMIXBUF_LOG(("%s: Parent buffer %s is full\n", 1755 pMixBuf->pszName, pMixBuf->pParent->pszName)); 1756 1757 return VINF_BUFFER_OVERFLOW; 1758 } 1745 1759 1746 1760 PPDMAUDMIXBUF_FN_CONVFROM pCnvFrm; … … 1793 1807 #endif 1794 1808 1795 uint32_t cWritten ;1809 uint32_t cWrittenTotal = 0; 1796 1810 1797 1811 PDMAUDMIXBUF_CONVOPTS convOpts; … … 1802 1816 { 1803 1817 convOpts.cSamples = cLenDst1; 1804 cWritten = pCnvFrm(pSamplesDst1, pvBuf, cbBuf, &convOpts);1805 Assert(cWritten == cLenDst1);1818 cWrittenTotal = pCnvFrm(pSamplesDst1, pvBuf, cbBuf, &convOpts); 1819 Assert(cWrittenTotal == cLenDst1); 1806 1820 1807 1821 #ifdef AUDIOMIXBUF_DEBUG_DUMP_PCM_DATA 1808 RTFileWrite(fh, p SamplesDst1, cWritten * sizeof(PDMAUDIOSAMPLE), NULL);1822 RTFileWrite(fh, pvBuf, cbBuf, NULL); 1809 1823 #endif 1810 1824 } … … 1817 1831 1818 1832 convOpts.cSamples = cLenDst2; 1819 cWritten 1820 Assert(cWritten == cLenDst2);1833 cWrittenTotal += pCnvFrm(pSamplesDst2, (uint8_t *)pvBuf + AUDIOMIXBUF_S2B(pMixBuf, cLenDst1), cbBuf, &convOpts); 1834 Assert(cWrittenTotal == (cLenDst1 + cLenDst2)); 1821 1835 1822 1836 #ifdef AUDIOMIXBUF_DEBUG_DUMP_PCM_DATA 1823 RTFileWrite(fh, pSamplesDst2, cWritten * sizeof(PDMAUDIOSAMPLE), NULL);1837 RTFileWrite(fh, (uint8_t *)pvBuf + AUDIOMIXBUF_S2B(pMixBuf, cLenDst1), cbBuf, NULL); 1824 1838 #endif 1825 1839 } … … 1832 1846 { 1833 1847 pMixBuf->offReadWrite = cOffWrite % pMixBuf->cSamples; 1848 pMixBuf->cProcessed = RT_MIN(pMixBuf->cProcessed + cLenDst1 + cLenDst2, 1849 pMixBuf->cSamples /* Max */); 1834 1850 1835 1851 uint32_t cProcessedTotal = pMixBuf->cProcessed + cLenDst1 + cLenDst2;
Note:
See TracChangeset
for help on using the changeset viewer.