Changeset 68085 in vbox
- Timestamp:
- Jul 21, 2017 12:52:58 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117124
- Location:
- trunk/src/VBox
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
r67577 r68085 1008 1008 */ 1009 1009 static DECLCALLBACK(int) drvHostALSAAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 1010 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)1010 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 1011 1011 { 1012 1012 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 1013 1013 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1014 1014 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 1015 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);1015 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 1016 1016 /* pcbRead is optional. */ 1017 1017 … … 1035 1035 { 1036 1036 case SND_PCM_STATE_PREPARED: 1037 cAvail = PDMAUDIOSTREAMCFG_B2S(pCfg, c bBuf);1037 cAvail = PDMAUDIOSTREAMCFG_B2S(pCfg, cxBuf); 1038 1038 break; 1039 1039 … … 1055 1055 if (!cAvail) 1056 1056 { 1057 if (pc bRead)1058 *pc bRead = 0;1057 if (pcxRead) 1058 *pcxRead = 0; 1059 1059 return VINF_SUCCESS; 1060 1060 } … … 1065 1065 * the mixer buffer. 1066 1066 */ 1067 size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_S2B(pCfg, cAvail), c bBuf);1067 size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_S2B(pCfg, cAvail), cxBuf); 1068 1068 1069 1069 LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail)); … … 1140 1140 if (RT_SUCCESS(rc)) 1141 1141 { 1142 if (pc bRead)1143 *pc bRead = cbReadTotal;1142 if (pcxRead) 1143 *pcxRead = cbReadTotal; 1144 1144 } 1145 1145 … … 1151 1151 */ 1152 1152 static DECLCALLBACK(int) drvHostALSAAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 1153 const void *pvBuf, uint32_t c bBuf, uint32_t *pcbWritten)1153 const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten) 1154 1154 { 1155 1155 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 1156 1156 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1157 1157 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 1158 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);1159 /* pc bWritten is optional. */1158 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 1159 /* pcxWritten is optional. */ 1160 1160 1161 1161 PALSAAUDIOSTREAM pStreamALSA = (PALSAAUDIOSTREAM)pStream; … … 1186 1186 1187 1187 /* Do not write more than available. */ 1188 if (cbToWrite > c bBuf)1189 cbToWrite = c bBuf;1188 if (cbToWrite > cxBuf) 1189 cbToWrite = cxBuf; 1190 1190 1191 1191 memcpy(pStreamALSA->pvBuf, pvBuf, cbToWrite); … … 1257 1257 if (RT_SUCCESS(rc)) 1258 1258 { 1259 if (pc bWritten)1260 *pc bWritten = cbWrittenTotal;1259 if (pcxWritten) 1260 *pcxWritten = cbWrittenTotal; 1261 1261 } 1262 1262 -
trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
r67363 r68085 1888 1888 */ 1889 1889 static DECLCALLBACK(int) drvHostCoreAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 1890 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)1890 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 1891 1891 { 1892 1892 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 1893 1893 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1894 /* pc bRead is optional. */1894 /* pcxRead is optional. */ 1895 1895 1896 1896 PCOREAUDIOSTREAM pCAStream = (PCOREAUDIOSTREAM)pStream; … … 1917 1917 if (ASMAtomicReadU32(&pCAStream->enmStatus) != COREAUDIOSTATUS_INIT) 1918 1918 { 1919 if (pc bRead)1920 *pc bRead = 0;1919 if (pcxRead) 1920 *pcxRead = 0; 1921 1921 return VINF_SUCCESS; 1922 1922 } … … 1931 1931 do 1932 1932 { 1933 size_t cbToWrite = RT_MIN(c bBuf, RTCircBufUsed(pCAStream->pCircBuf));1933 size_t cbToWrite = RT_MIN(cxBuf, RTCircBufUsed(pCAStream->pCircBuf)); 1934 1934 1935 1935 uint8_t *pvChunk; … … 1964 1964 if (RT_SUCCESS(rc)) 1965 1965 { 1966 if (pc bRead)1967 *pc bRead = cbReadTotal;1966 if (pcxRead) 1967 *pcxRead = cbReadTotal; 1968 1968 } 1969 1969 … … 1975 1975 */ 1976 1976 static DECLCALLBACK(int) drvHostCoreAudioStreamPlay(PPDMIHOSTAUDIO pInterface, 1977 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf,1978 uint32_t *pc bWritten)1977 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, 1978 uint32_t *pcxWritten) 1979 1979 { 1980 1980 PDRVHOSTCOREAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTCOREAUDIO(pInterface); … … 2001 2001 if (ASMAtomicReadU32(&pCAStream->enmStatus) != COREAUDIOSTATUS_INIT) 2002 2002 { 2003 if (pc bWritten)2004 *pc bWritten = 0;2003 if (pcxWritten) 2004 *pcxWritten = 0; 2005 2005 return VINF_SUCCESS; 2006 2006 } … … 2013 2013 AssertRC(rc); 2014 2014 2015 size_t cbToWrite = RT_MIN(c bBuf, RTCircBufFree(pCAStream->pCircBuf));2015 size_t cbToWrite = RT_MIN(cxBuf, RTCircBufFree(pCAStream->pCircBuf)); 2016 2016 Log3Func(("cbToWrite=%zu\n", cbToWrite)); 2017 2017 … … 2030 2030 2031 2031 Assert(cbChunk <= cbToWrite); 2032 Assert(cbWrittenTotal + cbChunk <= c bBuf);2032 Assert(cbWrittenTotal + cbChunk <= cxBuf); 2033 2033 2034 2034 memcpy(pvChunk, (uint8_t *)pvBuf + cbWrittenTotal, cbChunk); … … 2077 2077 if (RT_SUCCESS(rc)) 2078 2078 { 2079 if (pc bWritten)2080 *pc bWritten = cbWrittenTotal;2079 if (pcxWritten) 2080 *pcxWritten = cbWrittenTotal; 2081 2081 } 2082 2082 -
trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
r65694 r68085 1549 1549 */ 1550 1550 int drvHostDSoundStreamPlay(PPDMIHOSTAUDIO pInterface, 1551 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf, uint32_t *pcbWritten)1551 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten) 1552 1552 { 1553 1553 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 1554 1554 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1555 1555 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 1556 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);1557 /* pc bReadis optional. */1556 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 1557 /* pcxWritten is optional. */ 1558 1558 1559 1559 PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface); … … 1587 1587 cbFree -= cbSample; 1588 1588 1589 uint32_t cbLive = c bBuf;1589 uint32_t cbLive = cxBuf; 1590 1590 1591 1591 /* Do not write more than available space in the DirectSound playback buffer. */ … … 1671 1671 if (RT_SUCCESS(rc)) 1672 1672 { 1673 if (pc bWritten)1674 *pc bWritten = cbWrittenTotal;1673 if (pcxWritten) 1674 *pcxWritten = cbWrittenTotal; 1675 1675 } 1676 1676 else … … 1782 1782 */ 1783 1783 int drvHostDSoundStreamCapture(PPDMIHOSTAUDIO pInterface, 1784 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)1784 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 1785 1785 { 1786 1786 … … 1788 1788 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 1789 1789 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 1790 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);1790 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 1791 1791 1792 1792 PDRVHOSTDSOUND pThis = PDMIHOSTAUDIO_2_DRVHOSTDSOUND(pInterface); … … 1834 1834 break; 1835 1835 1836 if (c bBuf == 0)1836 if (cxBuf == 0) 1837 1837 { 1838 1838 DSLOGF(("DSound: Capture buffer full\n")); … … 1841 1841 1842 1842 DSLOGF(("DSound: Capture cbBuf=%RU32, offCurPos=%ld, offCaptureBufRead=%ld, cbToCapture=%ld\n", 1843 c bBuf, offCurPos, pStreamDS->In.offCaptureBufRead, cbToCapture));1843 cxBuf, offCurPos, pStreamDS->In.offCaptureBufRead, cbToCapture)); 1844 1844 1845 1845 /* No need to fetch more samples than mix buffer can receive. */ 1846 cbToCapture = RT_MIN(cbToCapture, c bBuf);1846 cbToCapture = RT_MIN(cbToCapture, cxBuf); 1847 1847 1848 1848 /* Lock relevant range in the DirectSound capture buffer. */ … … 1885 1885 if (RT_SUCCESS(rc)) 1886 1886 { 1887 if (pc bRead)1888 *pc bRead = cbReadTotal;1887 if (pcxRead) 1888 *pcxRead = cbReadTotal; 1889 1889 } 1890 1890 else -
trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
r67362 r68085 213 213 */ 214 214 static DECLCALLBACK(int) drvHostDebugAudioStreamPlay(PPDMIHOSTAUDIO pInterface, 215 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf,216 uint32_t *pc bWritten)215 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, 216 uint32_t *pcxWritten) 217 217 { 218 218 RT_NOREF(pInterface); … … 221 221 uint32_t cbWrittenTotal = 0; 222 222 223 uint32_t cbAvail = c bBuf;223 uint32_t cbAvail = cxBuf; 224 224 while (cbAvail) 225 225 { … … 249 249 } 250 250 251 if (pc bWritten)252 *pc bWritten = cbWrittenTotal;251 if (pcxWritten) 252 *pcxWritten = cbWrittenTotal; 253 253 254 254 return VINF_SUCCESS; … … 260 260 */ 261 261 static DECLCALLBACK(int) drvHostDebugAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 262 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)263 { 264 RT_NOREF(pInterface, pStream, pvBuf, c bBuf);262 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 263 { 264 RT_NOREF(pInterface, pStream, pvBuf, cxBuf); 265 265 266 266 /* Never capture anything. */ 267 if (pc bRead)268 *pc bRead = 0;267 if (pcxRead) 268 *pcxRead = 0; 269 269 270 270 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
r65694 r68085 135 135 */ 136 136 static DECLCALLBACK(int) drvHostNullAudioStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 137 const void *pvBuf, uint32_t c bBuf, uint32_t *pcbWritten)137 const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten) 138 138 { 139 139 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 140 140 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 141 141 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 142 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);142 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 143 143 144 144 RT_NOREF(pInterface, pStream, pvBuf); … … 146 146 /* Note: No copying of samples needed here, as this a NULL backend. */ 147 147 148 if (pc bWritten)149 *pc bWritten = cbBuf; /* Return all bytes as written. */148 if (pcxWritten) 149 *pcxWritten = cxBuf; /* Return all bytes as written. */ 150 150 151 151 return VINF_SUCCESS; … … 157 157 */ 158 158 static DECLCALLBACK(int) drvHostNullAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 159 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)159 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 160 160 { 161 161 RT_NOREF(pInterface, pStream); 162 162 163 163 /* Return silence. */ 164 RT_BZERO(pvBuf, c bBuf);165 166 if (pc bRead)167 *pc bRead = cbBuf;164 RT_BZERO(pvBuf, cxBuf); 165 166 if (pcxRead) 167 *pcxRead = cxBuf; 168 168 169 169 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
r65694 r68085 410 410 */ 411 411 static DECLCALLBACK(int) drvHostOSSAudioStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 412 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)412 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 413 413 { 414 414 RT_NOREF(pInterface); … … 419 419 int rc = VINF_SUCCESS; 420 420 421 size_t cbToRead = RT_MIN(pStreamOSS->cbBuf, c bBuf);421 size_t cbToRead = RT_MIN(pStreamOSS->cbBuf, cxBuf); 422 422 423 423 LogFlowFunc(("cbToRead=%zi\n", cbToRead)); … … 479 479 if (RT_SUCCESS(rc)) 480 480 { 481 if (pc bRead)482 *pc bRead = cbReadTotal;481 if (pcxRead) 482 *pcxRead = cbReadTotal; 483 483 } 484 484 … … 798 798 */ 799 799 static DECLCALLBACK(int) drvHostOSSAudioStreamPlay(PPDMIHOSTAUDIO pInterface, 800 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf,801 uint32_t *pc bWritten)800 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, 801 uint32_t *pcxWritten) 802 802 { 803 803 RT_NOREF(pInterface); … … 815 815 do 816 816 { 817 uint32_t cbAvail = c bBuf;817 uint32_t cbAvail = cxBuf; 818 818 uint32_t cbToWrite; 819 819 … … 838 838 cbData = cntinfo.ptr - pStreamOSS->old_optr; 839 839 else 840 cbData = c bBuf + cntinfo.ptr - pStreamOSS->old_optr;840 cbData = cxBuf + cntinfo.ptr - pStreamOSS->old_optr; 841 841 Assert(cbData >= 0); 842 842 … … 855 855 } 856 856 857 if ((size_t)abinfo.bytes > c bBuf)858 { 859 LogRel2(("OSS: Warning: Too big output size (%d > %RU32), limiting to %RU32\n", abinfo.bytes, c bBuf, cbBuf));860 abinfo.bytes = c bBuf;857 if ((size_t)abinfo.bytes > cxBuf) 858 { 859 LogRel2(("OSS: Warning: Too big output size (%d > %RU32), limiting to %RU32\n", abinfo.bytes, cxBuf, cxBuf)); 860 abinfo.bytes = cxBuf; 861 861 /* Keep going. */ 862 862 } … … 864 864 if (abinfo.bytes < 0) 865 865 { 866 LogRel2(("OSS: Warning: Invalid available size (%d vs. %RU32)\n", abinfo.bytes, c bBuf));866 LogRel2(("OSS: Warning: Invalid available size (%d vs. %RU32)\n", abinfo.bytes, cxBuf)); 867 867 rc = VERR_INVALID_PARAMETER; 868 868 break; … … 921 921 if (RT_SUCCESS(rc)) 922 922 { 923 if (pc bWritten)924 *pc bWritten = cbWrittenTotal;923 if (pcxWritten) 924 *pcxWritten = cbWrittenTotal; 925 925 } 926 926 -
trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
r68039 r68085 827 827 */ 828 828 static DECLCALLBACK(int) drvHostPulseAudioStreamCapture(PPDMIHOSTAUDIO pInterface, 829 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)830 { 831 RT_NOREF(pvBuf, c bBuf);829 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 830 { 831 RT_NOREF(pvBuf, cxBuf); 832 832 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 833 833 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 834 834 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 835 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);835 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 836 836 /* pcbRead is optional. */ 837 837 … … 858 858 if (!cbAvail) /* No data? Bail out. */ 859 859 { 860 if (pc bRead)861 *pc bRead = 0;860 if (pcxRead) 861 *pcxRead = 0; 862 862 return VINF_SUCCESS; 863 863 } … … 865 865 int rc = VINF_SUCCESS; 866 866 867 size_t cbToRead = RT_MIN(cbAvail, c bBuf);867 size_t cbToRead = RT_MIN(cbAvail, cxBuf); 868 868 869 869 Log3Func(("cbToRead=%zu, cbAvail=%zu, offPeekBuf=%zu, cbPeekBuf=%zu\n", … … 933 933 if (RT_SUCCESS(rc)) 934 934 { 935 if (pc bRead)936 *pc bRead = cbReadTotal;935 if (pcxRead) 936 *pcxRead = cbReadTotal; 937 937 } 938 938 … … 945 945 */ 946 946 static DECLCALLBACK(int) drvHostPulseAudioStreamPlay(PPDMIHOSTAUDIO pInterface, 947 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf,948 uint32_t *pc bWritten)949 { 950 RT_NOREF(pvBuf, c bBuf);947 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, 948 uint32_t *pcxWritten) 949 { 950 RT_NOREF(pvBuf, cxBuf); 951 951 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 952 952 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 953 953 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 954 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);955 /* pc bWritten is optional. */954 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 955 /* pcxWritten is optional. */ 956 956 957 957 PDRVHOSTPULSEAUDIO pThis = PDMIHOSTAUDIO_2_DRVHOSTPULSEAUDIO(pInterface); … … 973 973 } 974 974 975 size_t cbLeft = RT_MIN(cbWriteable, c bBuf);975 size_t cbLeft = RT_MIN(cbWriteable, cxBuf); 976 976 977 977 while (cbLeft) … … 999 999 if (RT_SUCCESS(rc)) 1000 1000 { 1001 if (pc bWritten)1002 *pc bWritten = cbWrittenTotal;1001 if (pcxWritten) 1002 *pcxWritten = cbWrittenTotal; 1003 1003 } 1004 1004 -
trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp
r67282 r68085 243 243 */ 244 244 static DECLCALLBACK(int) drvHostVaKitAudioStreamPlay(PPDMIHOSTAUDIO pInterface, 245 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t c bBuf,246 uint32_t *pc bWritten)245 PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, 246 uint32_t *pcxWritten) 247 247 { 248 248 PDRVHOSTVAKITAUDIO pDrv = RT_FROM_MEMBER(pInterface, DRVHOSTVAKITAUDIO, IHostAudio); … … 265 265 266 266 // Microseconds are used everythere below 267 uint32_t sBuf = c bBuf >> pStreamDbg->pCfg->Props.cShift;267 uint32_t sBuf = cxBuf >> pStreamDbg->pCfg->Props.cShift; 268 268 cch = RTStrPrintf(szTimingInfo, sizeof(szTimingInfo), "%d %d %d %d\n", 269 269 (uint32_t)(tsSinceStart / 1000), // Host time elapsed since Guest submitted the first buffer for playback … … 277 277 // pStreamDbg->Out.tsLastPlayed = PDMDrvHlpTMGetVirtualTime(pDrv->pDrvIns);; 278 278 279 int rc2 = DrvAudioHlpWAVFileWrite(&pStreamDbg->File, pvBuf, c bBuf, 0 /* fFlags */);279 int rc2 = DrvAudioHlpWAVFileWrite(&pStreamDbg->File, pvBuf, cxBuf, 0 /* fFlags */); 280 280 if (RT_FAILURE(rc2)) 281 281 LogRel(("DebugAudio: Writing output failed with %Rrc\n", rc2)); 282 282 283 *pc bWritten = cbBuf;283 *pcxWritten = cxBuf; 284 284 285 285 return VINF_SUCCESS; … … 291 291 */ 292 292 static DECLCALLBACK(int) drvHostVaKitAudioStreamCapture(PPDMIHOSTAUDIO pInterface, 293 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead) 294 { 295 RT_NOREF(pInterface, pStream, pvBuf, cbBuf); 293 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, 294 uint32_t *pcxRead) 295 { 296 RT_NOREF(pInterface, pStream, pvBuf, cxBuf); 296 297 297 298 /* Never capture anything. */ 298 if (pc bRead)299 *pc bRead = 0;299 if (pcxRead) 300 *pcxRead = 0; 300 301 301 302 return VINF_SUCCESS; -
trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
r68046 r68085 220 220 */ 221 221 static DECLCALLBACK(int) drvAudioVRDEStreamCapture(PPDMIHOSTAUDIO pInterface, 222 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)222 PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 223 223 { 224 224 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 225 225 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 226 226 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 227 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);228 /* pc bRead is optional. */227 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 228 /* pcxRead is optional. */ 229 229 230 230 PVRDESTREAM pStreamVRDE = (PVRDESTREAM)pStream; … … 236 236 void *pvData; 237 237 238 RTCircBufAcquireReadBlock(pStreamVRDE->In.pCircBuf, c bBuf, &pvData, &cbData);238 RTCircBufAcquireReadBlock(pStreamVRDE->In.pCircBuf, cxBuf, &pvData, &cbData); 239 239 240 240 if (cbData) … … 244 244 } 245 245 246 if (pc bRead)247 *pc bRead = (uint32_t)cbData;246 if (pcxRead) 247 *pcxRead = (uint32_t)cbData; 248 248 249 249 return VINF_SUCCESS; … … 255 255 */ 256 256 static DECLCALLBACK(int) drvAudioVRDEStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 257 const void *pvBuf, uint32_t c bBuf, uint32_t *pcbWritten)257 const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten) 258 258 { 259 259 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 260 260 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 261 261 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 262 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);263 /* pc bWritten is optional. */262 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 263 /* pcxWritten is optional. */ 264 264 265 265 PDRVAUDIOVRDE pDrv = RT_FROM_MEMBER(pInterface, DRVAUDIOVRDE, IHostAudio); … … 271 271 /* Note: We get the number of *samples* in cbBuf 272 272 * (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout) on stream creation. */ 273 uint32_t csLive = c bBuf;273 uint32_t csLive = cxBuf; 274 274 275 275 PPDMAUDIOPCMPROPS pProps = &pStreamVRDE->pCfg->Props; … … 328 328 /* Return samples instead of bytes here 329 329 * (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout). */ 330 if (pc bWritten)331 *pc bWritten = csWritten;330 if (pcxWritten) 331 *pcxWritten = csWritten; 332 332 } 333 333 -
trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
r67914 r68085 508 508 */ 509 509 static DECLCALLBACK(int) drvAudioVideoRecStreamCapture(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 510 void *pvBuf, uint32_t c bBuf, uint32_t *pcbRead)511 { 512 RT_NOREF(pInterface, pStream, pvBuf, c bBuf);513 514 if (pc bRead)515 *pc bRead = 0;510 void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead) 511 { 512 RT_NOREF(pInterface, pStream, pvBuf, cxBuf); 513 514 if (pcxRead) 515 *pcxRead = 0; 516 516 517 517 return VINF_SUCCESS; … … 523 523 */ 524 524 static DECLCALLBACK(int) drvAudioVideoRecStreamPlay(PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, 525 const void *pvBuf, uint32_t c bBuf, uint32_t *pcbWritten)525 const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten) 526 526 { 527 527 AssertPtrReturn(pInterface, VERR_INVALID_POINTER); 528 528 AssertPtrReturn(pStream, VERR_INVALID_POINTER); 529 529 AssertPtrReturn(pvBuf, VERR_INVALID_POINTER); 530 AssertReturn(c bBuf, VERR_INVALID_PARAMETER);531 /* pc bWritten is optional. */530 AssertReturn(cxBuf, VERR_INVALID_PARAMETER); 531 /* pcxWritten is optional. */ 532 532 533 533 PDRVAUDIOVIDEOREC pThis = PDMIHOSTAUDIO_2_DRVAUDIOVIDEOREC(pInterface); … … 551 551 size_t cbCircBuf; 552 552 553 uint32_t cbToWrite = c bBuf;553 uint32_t cbToWrite = cxBuf; 554 554 555 555 /* … … 692 692 * encoder actually did process those. 693 693 */ 694 if (pc bWritten)695 *pc bWritten = cbWrittenTotal;694 if (pcxWritten) 695 *pcxWritten = cbWrittenTotal; 696 696 697 697 LogFlowFunc(("csReadTotal=%RU32, rc=%Rrc\n", cbWrittenTotal, rc));
Note:
See TracChangeset
for help on using the changeset viewer.