Index: trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp	(revision 55340)
@@ -231,5 +231,5 @@
 }
 
-size_t audioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf)
+uint32_t audioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf)
 {
     return AUDIOMIXBUF_S2B(pMixBuf, audioMixBufFree(pMixBuf));
@@ -935,5 +935,5 @@
 int audioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf,
                       uint32_t offSamples,
-                      void *pvBuf, size_t cbBuf,
+                      void *pvBuf, uint32_t cbBuf,
                       uint32_t *pcbRead)
 {
@@ -944,5 +944,5 @@
 int audioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
                         uint32_t offSamples,
-                        void *pvBuf, size_t cbBuf,
+                        void *pvBuf, uint32_t cbBuf,
                         uint32_t *pcbRead)
 {
@@ -991,5 +991,5 @@
 
 int audioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf,
-                        void *pvBuf, size_t cbBuf, uint32_t *pcRead)
+                        void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
 {
     return audioMixBufReadCircEx(pMixBuf, pMixBuf->AudioFmt,
@@ -998,5 +998,5 @@
 
 int audioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                          void *pvBuf, size_t cbBuf, uint32_t *pcRead)
+                          void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
 {
     AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
@@ -1027,8 +1027,8 @@
 
     PPDMAUDIOSAMPLE pSamplesSrc1 = pMixBuf->pSamples + pMixBuf->offReadWrite;
-    size_t cLenSrc1 = cToRead;
+    uint32_t cLenSrc1 = cToRead;
 
     PPDMAUDIOSAMPLE pSamplesSrc2 = NULL;
-    size_t cLenSrc2 = 0;
+    uint32_t cLenSrc2 = 0;
 
     uint32_t offRead = pMixBuf->offReadWrite + cToRead;
@@ -1144,5 +1144,5 @@
  * @param   pMixBuf
  */
-size_t audioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf)
+uint32_t audioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf)
 {
     return AUDIOMIXBUF_S2B(pMixBuf, pMixBuf->cSamples);
@@ -1193,5 +1193,5 @@
 int audioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf,
                        uint32_t offSamples,
-                       const void *pvBuf, size_t cbBuf,
+                       const void *pvBuf, uint32_t cbBuf,
                        uint32_t *pcWritten)
 {
@@ -1214,5 +1214,5 @@
 int audioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
                          uint32_t offSamples,
-                         const void *pvBuf, size_t cbBuf,
+                         const void *pvBuf, uint32_t cbBuf,
                          uint32_t *pcWritten)
 {
@@ -1279,5 +1279,5 @@
 
 int audioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf,
-                         const void *pvBuf, size_t cbBuf,
+                         const void *pvBuf, uint32_t cbBuf,
                          uint32_t *pcWritten)
 {
@@ -1286,5 +1286,5 @@
 
 int audioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                           const void *pvBuf, size_t cbBuf,
+                           const void *pvBuf, uint32_t cbBuf,
                            uint32_t *pcWritten)
 {
@@ -1327,8 +1327,8 @@
 
     PPDMAUDIOSAMPLE pSamplesDst1 = pMixBuf->pSamples + pMixBuf->offReadWrite;
-    size_t cLenDst1 = cToWrite;
+    uint32_t cLenDst1 = cToWrite;
 
     PPDMAUDIOSAMPLE pSamplesDst2 = NULL;
-    size_t cLenDst2 = 0;
+    uint32_t cLenDst2 = 0;
 
     uint32_t offWrite = pMixBuf->offReadWrite + cToWrite;
Index: trunk/src/VBox/Devices/Audio/AudioMixBuffer.h
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixBuffer.h	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/AudioMixBuffer.h	(revision 55340)
@@ -54,5 +54,5 @@
 void audioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear);
 uint32_t audioMixBufFree(PPDMAUDIOMIXBUF pMixBuf);
-size_t audioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf);
+uint32_t audioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf);
 int audioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMPCMPROPS pProps, uint32_t cSamples);
 bool audioMixBufIsEmpty(PPDMAUDIOMIXBUF pMixBuf);
@@ -62,17 +62,17 @@
 int audioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples, uint32_t *pcProcessed);
 uint32_t audioMixBufProcessed(PPDMAUDIOMIXBUF pMixBuf);
-int audioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, void *pvBuf, size_t cbBuf, uint32_t *pcbRead);
-int audioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, void *pvBuf, size_t cbBuf, uint32_t *pcbRead);
-int audioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf, void *pvBuf, size_t cbBuf, uint32_t *pcRead);
-int audioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, void *pvBuf, size_t cbBuf, uint32_t *pcRead);
+int audioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
+int audioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
+int audioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead);
+int audioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead);
 void audioMixBufReset(PPDMAUDIOMIXBUF pMixBuf);
 void audioMixBufSetVolume(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOVOLUME pVol);
 uint32_t audioMixBufSize(PPDMAUDIOMIXBUF pMixBuf);
-size_t audioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf);
+uint32_t audioMixBufSizeBytes(PPDMAUDIOMIXBUF pMixBuf);
 void audioMixBufUnlink(PPDMAUDIOMIXBUF pMixBuf);
-int audioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, const void *pvBuf, size_t cbBuf, uint32_t *pcWritten);
-int audioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, const void *pvBuf, size_t cbBuf, uint32_t *pcWritten);
-int audioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf, const void *pvBuf, size_t cbBuf, uint32_t *pcWritten);
-int audioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, const void *pvBuf, size_t cbBuf, uint32_t *pcWritten);
+int audioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
+int audioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, uint32_t offSamples, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
+int audioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
+int audioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten);
 
 #endif /* AUDIO_MIXBUF_H */
Index: trunk/src/VBox/Devices/Audio/AudioMixer.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 55340)
@@ -281,5 +281,5 @@
 }
 
-int audioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, size_t cbBuf, uint32_t *pcbProcessed)
+int audioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed)
 {
     AssertPtrReturn(pSink, VERR_INVALID_POINTER);
@@ -307,5 +307,5 @@
 
         uint32_t cbTotalRead = 0;
-        size_t cbToRead = cbBuf;
+        uint32_t cbToRead = cbBuf;
 
         while (cbToRead)
@@ -344,5 +344,5 @@
 }
 
-int audioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, size_t cbBuf, uint32_t *pcbProcessed)
+int audioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed)
 {
     return VERR_NOT_IMPLEMENTED;
Index: trunk/src/VBox/Devices/Audio/AudioMixer.h
===================================================================
--- trunk/src/VBox/Devices/Audio/AudioMixer.h	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/AudioMixer.h	(revision 55340)
@@ -100,6 +100,6 @@
 uint32_t audioMixerGetStreamCount(PAUDIOMIXER pMixer);
 void audioMixerInvalidate(PAUDIOMIXER pMixer);
-int audioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, size_t cbBuf, uint32_t *pcbProcessed);
-int audioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, size_t cbBuf, uint32_t *pcbProcessed);
+int audioMixerProcessSinkIn(PAUDMIXSINK pSink, AUDMIXOP enmOp, void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed);
+int audioMixerProcessSinkOut(PAUDMIXSINK pSink, AUDMIXOP enmOp, const void *pvBuf, uint32_t cbBuf, uint32_t *pcbProcessed);
 void audioMixerRemoveSink(PAUDIOMIXER pMixer, PAUDMIXSINK pSink);
 void audioMixerRemoveStream(PAUDMIXSINK pMixer, PAUDMIXSTREAM pStream);
Index: trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 55340)
@@ -396,6 +396,6 @@
     else
     {
+        rc = VERR_ACCESS_DENIED;
         LogFlowFunc(("[%s] Still is being used, rc=%Rrc\n", pHstStrmOut->MixBuf.pszName, rc));
-        rc = VERR_ACCESS_DENIED;
     }
 
@@ -861,5 +861,5 @@
  */
 int drvAudioWrite(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMOUT pGstStrmOut,
-                  const void *pvBuf, size_t cbBuf, uint32_t *pcbWritten)
+                  const void *pvBuf, uint32_t cbBuf, uint32_t *pcbWritten)
 {
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
@@ -976,6 +976,6 @@
     else
     {
+        rc = VERR_ACCESS_DENIED;
         LogFlowFunc(("[%s] Still is being used, rc=%Rrc\n", pHstStrmIn->MixBuf.pszName, rc));
-        rc = VERR_ACCESS_DENIED;
     }
 
@@ -1401,5 +1401,5 @@
 
 static DECLCALLBACK(int) drvAudioRead(PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOGSTSTRMIN pGstStrmIn,
-                                      void *pvBuf, size_t cbBuf, uint32_t *pcbRead)
+                                      void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead)
 {
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
Index: trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 55339)
+++ trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 55340)
@@ -92,6 +92,6 @@
      * Circular writes.
      */
-    size_t cToWrite = audioMixBufSize(&mb) - written_abs - 1; /* -1 as padding plus -2 samples for above. */
-    for (size_t i = 0; i < cToWrite; i++)
+    uint32_t cToWrite = audioMixBufSize(&mb) - written_abs - 1; /* -1 as padding plus -2 samples for above. */
+    for (uint32_t i = 0; i < cToWrite; i++)
     {
         RTTESTI_CHECK_RC_OK(audioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &written));
@@ -110,6 +110,6 @@
 
     /* Circular reads. */
-    size_t cToRead = audioMixBufSize(&mb) - written_abs - 1;
-    for (size_t i = 0; i < cToWrite; i++)
+    uint32_t cToRead = audioMixBufSize(&mb) - written_abs - 1;
+    for (uint32_t i = 0; i < cToWrite; i++)
     {
         RTTESTI_CHECK_RC_OK(audioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &read));
@@ -186,8 +186,8 @@
      * Writing + mixing from child/children -> parent, sequential.
      */
-    size_t cbBuf = _1K;
+    uint32_t cbBuf = _1K;
     char pvBuf[_1K];
     int16_t samples[32] = { 0xAA, 0xBB };
-    uint32_t free, read , written, proc, mixed, temp;
+    uint32_t read , written, mixed, temp;
 
     uint32_t cChild1Free     = cBufSize;
