Index: /trunk/include/VBox/vmm/pdmaudioifs.h
===================================================================
--- /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 68131)
+++ /trunk/include/VBox/vmm/pdmaudioifs.h	(revision 68132)
@@ -199,7 +199,9 @@
 
 /**
- * A single audio sample, representing left and right channels (stereo).
- */
-typedef struct PDMAUDIOSAMPLE
+ * A single audio frame.
+ *
+ * Currently only two (2) channels, left and right, are supported.
+ */
+typedef struct PDMAUDIOFRAME
 {
     /** Left channel. */
@@ -207,9 +209,9 @@
     /** Right channel. */
     int64_t i64RSample;
-} PDMAUDIOSAMPLE;
-/** Pointer to a single (stereo) audio sample.   */
-typedef PDMAUDIOSAMPLE *PPDMAUDIOSAMPLE;
-/** Pointer to a const single (stereo) audio sample.   */
-typedef PDMAUDIOSAMPLE const *PCPDMAUDIOSAMPLE;
+} PDMAUDIOFRAME;
+/** Pointer to a single (stereo) audio frame. */
+typedef PDMAUDIOFRAME *PPDMAUDIOFRAME;
+/** Pointer to a const single (stereo) audio frame. */
+typedef PDMAUDIOFRAME const *PCPDMAUDIOFRAME;
 
 typedef enum PDMAUDIOENDIANNESS
@@ -287,5 +289,5 @@
     /** Raw (pass through) data, with no data layout processing done.
      *
-     *  This means that this stream will operate on PDMAUDIOSAMPLE data
+     *  This means that this stream will operate on PDMAUDIOFRAME data
      *  directly. Don't use this if you don't have to. */
     PDMAUDIOSTREAMLAYOUT_RAW,
@@ -322,5 +324,5 @@
     /** Frame size (in bytes) of this channel. */
     size_t                    cbFrame;
-    /** Offset (in bytes) to first sample in the data block. */
+    /** Offset (in bytes) to first frame in the data block. */
     size_t                    cbFirst;
     /** Currente offset (in bytes) in the data stream. */
@@ -356,5 +358,5 @@
     uint32_t    uHz;
     /** Shift count used for faster calculation of various
-     *  values, such as the alignment, bytes to samples and so on.
+     *  values, such as the alignment, bytes to frames and so on.
      *  Depends on number of stream channels and the stream format
      *  being used.
@@ -367,5 +369,5 @@
 } PDMAUDIOPCMPROPS, *PPDMAUDIOPCMPROPS;
 
-/** Calculates the cShift value of given samples bits and audio channels.
+/** Calculates the cShift value of given sample bits and audio channels.
  *  Note: Does only support mono/stereo channels for now. */
 #define PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(cBits, cChannels)     ((cChannels == 2) + (cBits / 16))
@@ -373,10 +375,10 @@
  *  Note: Does only support mono/stereo channels for now. */
 #define PDMAUDIOPCMPROPS_MAKE_SHIFT(pProps)                     PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS((pProps)->cChannels == 2) + (pProps)->cBits / 16)
-/** Converts (audio) samples to bytes.
+/** Converts (audio) frames to bytes.
  *  Needs the cShift value set correctly, using PDMAUDIOPCMPROPS_MAKE_SHIFT. */
-#define PDMAUDIOPCMPROPS_S2B(pProps, samples)                   ((samples) << (pProps)->cShift)
-/** Converts bytes to (audio) samples.
+#define PDMAUDIOPCMPROPS_F2B(pProps, frames)                    ((frames) << (pProps)->cShift)
+/** Converts bytes to (audio) frames.
  *  Needs the cShift value set correctly, using PDMAUDIOPCMPROPS_MAKE_SHIFT. */
-#define PDMAUDIOPCMPROPS_B2S(pProps, cb)                        (cb >> (pProps)->cShift)
+#define PDMAUDIOPCMPROPS_B2F(pProps, cb)                        (cb >> (pProps)->cShift)
 
 /**
@@ -399,20 +401,20 @@
      *
      *  PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED:
-     *      One stream at once. The consecutive audio data is exactly in the format and sample width
+     *      One stream at once. The consecutive audio data is exactly in the format and frame width
      *      like defined in the PCM properties. This is the default.
      *
      *  PDMAUDIOSTREAMLAYOUT_RAW:
      *      Can be one or many streams at once, depending on the stream's mixing buffer setup.
-     *      The audio data will get handled as PDMAUDIOSAMPLE samples without any modification done. */
+     *      The audio data will get handled as PDMAUDIOFRAME frames without any modification done. */
     PDMAUDIOSTREAMLAYOUT     enmLayout;
-    /** Hint about the optimal sample buffer size (in audio samples).
+    /** Hint about the optimal frame buffer size (in audio frames).
      *  0 if no hint is given. */
-    uint32_t                 cSampleBufferHint;
+    uint32_t                 cFrameBufferHint;
 } PDMAUDIOSTREAMCFG, *PPDMAUDIOSTREAMCFG;
 
-/** Converts (audio) samples to bytes. */
-#define PDMAUDIOSTREAMCFG_S2B(pCfg, samples) ((samples) << (pCfg->Props).cShift)
-/** Converts bytes to (audio) samples. */
-#define PDMAUDIOSTREAMCFG_B2S(pCfg, cb)  (cb >> (pCfg->Props).cShift)
+/** Converts (audio) frames to bytes. */
+#define PDMAUDIOSTREAMCFG_F2B(pCfg, frames) ((frames) << (pCfg->Props).cShift)
+/** Converts bytes to (audio) frames. */
+#define PDMAUDIOSTREAMCFG_B2F(pCfg, cb)  (cb >> (pCfg->Props).cShift)
 
 #if defined(RT_LITTLE_ENDIAN)
@@ -507,7 +509,7 @@
      *  stream. */
     uint32_t       srcOffset;
-    /** Last processed sample of the input stream.
+    /** Last processed frame of the input stream.
      *  Needed for interpolation. */
-    PDMAUDIOSAMPLE srcSampleLast;
+    PDMAUDIOFRAME  srcFrameLast;
 } PDMAUDIOSTRMRATE, *PPDMAUDIOSTRMRATE;
 
@@ -532,11 +534,11 @@
 
 /**
- * Structure for holding sample conversion parameters for
+ * Structure for holding frame conversion parameters for
  * the audioMixBufConvFromXXX / audioMixBufConvToXXX macros.
  */
 typedef struct PDMAUDMIXBUFCONVOPTS
 {
-    /** Number of audio samples to convert. */
-    uint32_t        cSamples;
+    /** Number of audio frames to convert. */
+    uint32_t                cFrames;
     union
     {
@@ -554,5 +556,5 @@
 
 /**
- * Note: All internal handling is done in samples,
+ * Note: All internal handling is done in audio frames,
  *       not in bytes!
  */
@@ -563,11 +565,11 @@
  * Convertion-from function used by the PDM audio buffer mixer.
  *
- * @returns Number of samples returned.
- * @param   paDst           Where to return the converted samples.
- * @param   pvSrc           The source samples bytes.
+ * @returns Number of audio frames returned.
+ * @param   paDst           Where to return the converted frames.
+ * @param   pvSrc           The source frame bytes.
  * @param   cbSrc           Number of bytes to convert.
  * @param   pOpts           Conversion options.
  */
-typedef DECLCALLBACK(uint32_t) FNPDMAUDIOMIXBUFCONVFROM(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc,
+typedef DECLCALLBACK(uint32_t) FNPDMAUDIOMIXBUFCONVFROM(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc,
                                                         PCPDMAUDMIXBUFCONVOPTS pOpts);
 /** Pointer to a convertion-from function used by the PDM audio buffer mixer. */
@@ -578,8 +580,8 @@
  *
  * @param   pvDst           Output buffer.
- * @param   paSrc           The input samples.
+ * @param   paSrc           The input frames.
  * @param   pOpts           Conversion options.
  */
-typedef DECLCALLBACK(void) FNPDMAUDIOMIXBUFCONVTO(void *pvDst, PCPDMAUDIOSAMPLE paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts);
+typedef DECLCALLBACK(void) FNPDMAUDIOMIXBUFCONVTO(void *pvDst, PCPDMAUDIOFRAME paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts);
 /** Pointer to a convertion-to function used by the PDM audio buffer mixer. */
 typedef FNPDMAUDIOMIXBUFCONVTO *PFNPDMAUDIOMIXBUFCONVTO;
@@ -591,21 +593,21 @@
     /** Name of the buffer. */
     char                     *pszName;
-    /** Sample buffer. */
-    PPDMAUDIOSAMPLE           pSamples;
-    /** Size of the sample buffer (in samples). */
-    uint32_t                  cSamples;
-    /** The current read position (in samples). */
+    /** Frame buffer. */
+    PPDMAUDIOFRAME            pFrames;
+    /** Size of the frame buffer (in audio frames). */
+    uint32_t                  cFrames;
+    /** The current read position (in frames). */
     uint32_t                  offRead;
-    /** The current write position (in samples). */
+    /** The current write position (in frames). */
     uint32_t                  offWrite;
     /**
-     * Total samples already mixed down to the parent buffer (if any). Always starting at
+     * Total frames already mixed down to the parent buffer (if any). Always starting at
      * the parent's offRead position.
      *
-     * Note: Count always is specified in parent samples, as the sample count can differ between parent
+     * Note: Count always is specified in parent frames, as the sample count can differ between parent
      *       and child.
      */
     uint32_t                  cMixed;
-    /** How much audio samples are currently being used
+    /** How much audio frames are currently being used
      *  in this buffer.
      *  Note: This also is known as the distance in ring buffer terms. */
@@ -638,5 +640,5 @@
      */
     int64_t                   iFreqRatio;
-    /** For quickly converting samples <-> bytes and vice versa. */
+    /** For quickly converting frames <-> bytes and vice versa. */
     uint8_t                   cShift;
 } PDMAUDIOMIXBUF;
@@ -750,5 +752,5 @@
     STAMCOUNTER StatBytesElapsed;
     STAMCOUNTER StatBytesTotalRead;
-    STAMCOUNTER StatSamplesCaptured;
+    STAMCOUNTER StatFramesCaptured;
 #endif
 } PDMAUDIOSTREAMIN, *PPDMAUDIOSTREAMIN;
@@ -765,5 +767,5 @@
     STAMCOUNTER StatBytesElapsed;
     STAMCOUNTER StatBytesTotalWritten;
-    STAMCOUNTER StatSamplesPlayed;
+    STAMCOUNTER StatFramesPlayed;
 #endif
 } PDMAUDIOSTREAMOUT, *PPDMAUDIOSTREAMOUT;
@@ -1037,22 +1039,22 @@
 
     /**
-     * Plays (transfers) available audio samples via the host backend. Only works with output streams.
+     * Plays (transfers) available audio frames via the host backend. Only works with output streams.
      *
      * @returns VBox status code.
      * @param   pInterface           Pointer to the interface structure containing the called function pointer.
      * @param   pStream              Pointer to audio stream.
-     * @param   pcSamplesPlayed      Number of samples played. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnStreamPlay, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesPlayed));
-
-    /**
-     * Captures (transfers) available audio samples from the host backend. Only works with input streams.
+     * @param   pcFramesPlayed       Number of frames played. Optional.
+     */
+    DECLR3CALLBACKMEMBER(int, pfnStreamPlay, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcFramesPlayed));
+
+    /**
+     * Captures (transfers) available audio frames from the host backend. Only works with input streams.
      *
      * @returns VBox status code.
      * @param   pInterface           Pointer to the interface structure containing the called function pointer.
      * @param   pStream              Pointer to audio stream.
-     * @param   pcSamplesCaptured    Number of samples captured. Optional.
-     */
-    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesCaptured));
+     * @param   pcFramesCaptured     Number of frames captured. Optional.
+     */
+    DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIAUDIOCONNECTOR pInterface, PPDMAUDIOSTREAM pStream, uint32_t *pcFramesCaptured));
 
 #ifdef VBOX_WITH_AUDIO_DEVICE_CALLBACKS
@@ -1183,5 +1185,5 @@
      *
      * @returns For non-raw layout streams: Number of readable bytes.
-     *          for raw layout streams    : Number of readable audio samples.
+     *          for raw layout streams    : Number of readable audio frames.
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   pStream             Pointer to audio stream.
@@ -1193,5 +1195,5 @@
      *
      * @returns For non-raw layout streams: Number of writable bytes.
-     *          for raw layout streams    : Number of writable audio samples.
+     *          for raw layout streams    : Number of writable audio frames.
      * @param   pInterface          Pointer to the interface structure containing the called function pointer.
      * @param   pStream             Pointer to audio stream.
@@ -1233,7 +1235,7 @@
      * @param   pvBuf               Pointer to audio data buffer to play.
      * @param   cxBuf               For non-raw layout streams: Size (in bytes) of audio data buffer,
-     *                              for raw layout streams    : Size (in audio samples) of audio data buffer.
-     * @param   pcxWritten          For non-raw layout streams: Returns number of bytes written.    Optional.
-     *                              for raw layout streams    : Returns number of samples written.  Optional.
+     *                              for raw layout streams    : Size (in audio frames) of audio data buffer.
+     * @param   pcxWritten          For non-raw layout streams: Returns number of bytes written.   Optional.
+     *                              for raw layout streams    : Returns number of frames written.  Optional.
      */
     DECLR3CALLBACKMEMBER(int, pfnStreamPlay, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, const void *pvBuf, uint32_t cxBuf, uint32_t *pcxWritten));
@@ -1263,7 +1265,7 @@
      * @param   pvBuf               Buffer where to store read audio data.
      * @param   cxBuf               For non-raw layout streams: Size (in bytes) of audio data buffer,
-     *                              for raw layout streams    : Size (in audio samples) of audio data buffer.
-     * @param   pcxRead             For non-raw layout streams: Returns number of bytes read.    Optional.
-     *                              for raw layout streams    : Returns number of samples read.  Optional.
+     *                              for raw layout streams    : Size (in audio frames) of audio data buffer.
+     * @param   pcxRead             For non-raw layout streams: Returns number of bytes read.   Optional.
+     *                              for raw layout streams    : Returns number of frames read.  Optional.
      */
     DECLR3CALLBACKMEMBER(int, pfnStreamCapture, (PPDMIHOSTAUDIO pInterface, PPDMAUDIOBACKENDSTREAM pStream, void *pvBuf, uint32_t cxBuf, uint32_t *pcxRead));
Index: /trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/AudioMixBuffer.cpp	(revision 68132)
@@ -1,6 +1,5 @@
 /* $Id$ */
 /** @file
- * VBox audio: Audio mixing buffer for converting reading/writing audio
- *             samples.
+ * VBox audio: Audio mixing buffer for converting reading/writing audio data.
  */
 
@@ -137,49 +136,49 @@
 
 /**
- * Peeks for audio samples without any conversion done.
- * This will get the raw sample data out of a mixing buffer.
+ * Peeks for audio frames without any conversion done.
+ * This will get the raw frame data out of a mixing buffer.
  *
  * @return  IPRT status code or VINF_AUDIO_MORE_DATA_AVAILABLE if more data is available to read.
  *
- * @param   pMixBuf                 Mixing buffer to acquire audio samples from.
- * @param   cSamplesToRead          Number of audio samples to read.
- * @param   paSampleBuf             Buffer where to store the returned audio samples.
- * @param   cSampleBuf              Size (in samples) of the buffer to store audio samples into.
- * @param   pcSamplesRead           Returns number of read audio samples. Optional.
+ * @param   pMixBuf                 Mixing buffer to acquire audio frames from.
+ * @param   cFramesToRead           Number of audio frames to read.
+ * @param   paFrameBuf              Buffer where to store the returned audio frames.
+ * @param   cFrameBuf               Size (in frames) of the buffer to store audio frames into.
+ * @param   pcFramesRead            Returns number of read audio frames. Optional.
  *
  * @remark  This function is not thread safe!
  */
-int AudioMixBufPeek(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead,
-                    PPDMAUDIOSAMPLE paSampleBuf, uint32_t cSampleBuf, uint32_t *pcSamplesRead)
-{
-    AssertPtrReturn(pMixBuf,     VERR_INVALID_POINTER);
-    AssertPtrReturn(paSampleBuf, VERR_INVALID_POINTER);
-    AssertReturn(cSampleBuf,     VERR_INVALID_PARAMETER);
+int AudioMixBufPeek(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFramesToRead,
+                    PPDMAUDIOFRAME paFrameBuf, uint32_t cFrameBuf, uint32_t *pcFramesRead)
+{
+    AssertPtrReturn(pMixBuf,    VERR_INVALID_POINTER);
+    AssertPtrReturn(paFrameBuf, VERR_INVALID_POINTER);
+    AssertReturn(cFrameBuf,     VERR_INVALID_PARAMETER);
     /* pcRead is optional. */
 
     int rc;
 
-    if (!cSamplesToRead)
-    {
-        if (pcSamplesRead)
-            *pcSamplesRead = 0;
+    if (!cFramesToRead)
+    {
+        if (pcFramesRead)
+            *pcFramesRead = 0;
         return VINF_SUCCESS;
     }
 
     uint32_t cRead;
-    if (pMixBuf->offRead + cSamplesToRead > pMixBuf->cSamples)
-    {
-        cRead = pMixBuf->cSamples - pMixBuf->offRead;
+    if (pMixBuf->offRead + cFramesToRead > pMixBuf->cFrames)
+    {
+        cRead = pMixBuf->cFrames - pMixBuf->offRead;
         rc = VINF_AUDIO_MORE_DATA_AVAILABLE;
     }
     else
     {
-        cRead = cSamplesToRead;
+        cRead = cFramesToRead;
         rc = VINF_SUCCESS;
     }
 
-    if (cRead > cSampleBuf)
-    {
-        cRead = cSampleBuf;
+    if (cRead > cFrameBuf)
+    {
+        cRead = cFrameBuf;
         rc = VINF_AUDIO_MORE_DATA_AVAILABLE;
     }
@@ -187,13 +186,13 @@
     if (cRead)
     {
-        memcpy(paSampleBuf, &pMixBuf->pSamples[pMixBuf->offRead], sizeof(PDMAUDIOSAMPLE) * cRead);
-
-        pMixBuf->offRead = (pMixBuf->offRead + cRead) % pMixBuf->cSamples;
-        Assert(pMixBuf->offRead <= pMixBuf->cSamples);
+        memcpy(paFrameBuf, &pMixBuf->pFrames[pMixBuf->offRead], sizeof(PDMAUDIOFRAME) * cRead);
+
+        pMixBuf->offRead = (pMixBuf->offRead + cRead) % pMixBuf->cFrames;
+        Assert(pMixBuf->offRead <= pMixBuf->cFrames);
         pMixBuf->cUsed  -= RT_MIN(cRead, pMixBuf->cUsed);
     }
 
-    if (pcSamplesRead)
-        *pcSamplesRead = cRead;
+    if (pcFramesRead)
+        *pcFramesRead = cRead;
 
     return rc;
@@ -201,50 +200,50 @@
 
 /**
- * Returns a mutable pointer to the mixing buffer's audio sample buffer for writing raw
- * audio samples.
+ * Returns a mutable pointer to the mixing buffer's audio frame buffer for writing raw
+ * audio frames.
  *
  * @return  IPRT status code. VINF_TRY_AGAIN for getting next pointer at beginning (circular).
- * @param   pMixBuf                 Mixing buffer to acquire audio samples from.
- * @param   cSamples                Number of requested audio samples to write.
- * @param   ppvSamples              Returns a mutable pointer to the buffer's audio sample data.
- * @param   pcSamplesToWrite        Number of available audio samples to write.
+ * @param   pMixBuf                 Mixing buffer to acquire audio frames from.
+ * @param   cFrames                 Number of requested audio frames to write.
+ * @param   ppvFrames               Returns a mutable pointer to the buffer's audio frame data.
+ * @param   pcFramesToWrite         Number of available audio frames to write.
  *
  * @remark  This function is not thread safe!
  */
-int AudioMixBufPeekMutable(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples,
-                           PPDMAUDIOSAMPLE *ppvSamples, uint32_t *pcSamplesToWrite)
-{
-    AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertPtrReturn(ppvSamples, VERR_INVALID_POINTER);
-    AssertPtrReturn(pcSamplesToWrite, VERR_INVALID_POINTER);
+int AudioMixBufPeekMutable(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFrames,
+                           PPDMAUDIOFRAME *ppvFrames, uint32_t *pcFramesToWrite)
+{
+    AssertPtrReturn(pMixBuf,         VERR_INVALID_POINTER);
+    AssertPtrReturn(ppvFrames,       VERR_INVALID_POINTER);
+    AssertPtrReturn(pcFramesToWrite, VERR_INVALID_POINTER);
 
     int rc;
 
-    if (!cSamples)
-    {
-        *pcSamplesToWrite = 0;
+    if (!cFrames)
+    {
+        *pcFramesToWrite = 0;
         return VINF_SUCCESS;
     }
 
-    uint32_t cSamplesToWrite;
-    if (pMixBuf->offWrite + cSamples > pMixBuf->cSamples)
-    {
-        cSamplesToWrite = pMixBuf->cSamples - pMixBuf->offWrite;
+    uint32_t cFramesToWrite;
+    if (pMixBuf->offWrite + cFrames > pMixBuf->cFrames)
+    {
+        cFramesToWrite = pMixBuf->cFrames - pMixBuf->offWrite;
         rc = VINF_TRY_AGAIN;
     }
     else
     {
-        cSamplesToWrite = cSamples;
+        cFramesToWrite = cFrames;
         rc = VINF_SUCCESS;
     }
 
-    *ppvSamples = &pMixBuf->pSamples[pMixBuf->offWrite];
-    AssertPtr(ppvSamples);
-
-    pMixBuf->offWrite = (pMixBuf->offWrite + cSamplesToWrite) % pMixBuf->cSamples;
-    Assert(pMixBuf->offWrite <= pMixBuf->cSamples);
-    pMixBuf->cUsed += RT_MIN(cSamplesToWrite, pMixBuf->cUsed);
-
-    *pcSamplesToWrite = cSamplesToWrite;
+    *ppvFrames = &pMixBuf->pFrames[pMixBuf->offWrite];
+    AssertPtr(ppvFrames);
+
+    pMixBuf->offWrite = (pMixBuf->offWrite + cFramesToWrite) % pMixBuf->cFrames;
+    Assert(pMixBuf->offWrite <= pMixBuf->cFrames);
+    pMixBuf->cUsed += RT_MIN(cFramesToWrite, pMixBuf->cUsed);
+
+    *pcFramesToWrite = cFramesToWrite;
 
     return rc;
@@ -252,5 +251,5 @@
 
 /**
- * Clears the entire sample buffer.
+ * Clears the entire frame buffer.
  *
  * @param   pMixBuf                 Mixing buffer to clear.
@@ -261,18 +260,18 @@
     AssertPtrReturnVoid(pMixBuf);
 
-    if (pMixBuf->cSamples)
-        RT_BZERO(pMixBuf->pSamples, pMixBuf->cSamples * sizeof(PDMAUDIOSAMPLE));
-}
-
-/**
- * Clears (zeroes) the buffer by a certain amount of (used) samples and
+    if (pMixBuf->cFrames)
+        RT_BZERO(pMixBuf->pFrames, pMixBuf->cFrames * sizeof(PDMAUDIOFRAME));
+}
+
+/**
+ * Clears (zeroes) the buffer by a certain amount of (used) frames and
  * keeps track to eventually assigned children buffers.
  *
  * @param   pMixBuf                 Mixing buffer to clear.
- * @param   cSamplesToClear         Number of audio samples to clear.
- */
-void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear)
-{
-    AUDMIXBUF_LOG(("cSamplesToClear=%RU32\n", cSamplesToClear));
+ * @param   cFramesToClear          Number of audio frames to clear.
+ */
+void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFramesToClear)
+{
+    AUDMIXBUF_LOG(("cFramesToClear=%RU32\n", cFramesToClear));
     AUDMIXBUF_LOG(("%s: offRead=%RU32, cUsed=%RU32\n",
                    pMixBuf->pszName, pMixBuf->offRead, pMixBuf->cUsed));
@@ -282,11 +281,11 @@
     {
         AUDMIXBUF_LOG(("\t%s: cMixed=%RU32 -> %RU32\n",
-                       pIter->pszName, pIter->cMixed, pIter->cMixed - cSamplesToClear));
-
-        pIter->cMixed -= RT_MIN(pIter->cMixed, cSamplesToClear);
+                       pIter->pszName, pIter->cMixed, pIter->cMixed - cFramesToClear));
+
+        pIter->cMixed -= RT_MIN(pIter->cMixed, cFramesToClear);
         /* Note: Do not increment pIter->cUsed here, as this gets done when reading from that buffer using AudioMixBufReadXXX. */
     }
 
-    Assert(cSamplesToClear <= pMixBuf->cSamples);
+    Assert(cFramesToClear <= pMixBuf->cFrames);
 
     uint32_t cClearOff;
@@ -294,31 +293,31 @@
 
     /* Clear end of buffer (wrap around). */
-    if (cSamplesToClear > pMixBuf->offRead)
-    {
-        cClearOff = pMixBuf->cSamples - (cSamplesToClear - pMixBuf->offRead);
-        cClearLen = pMixBuf->cSamples - cClearOff;
+    if (cFramesToClear > pMixBuf->offRead)
+    {
+        cClearOff = pMixBuf->cFrames - (cFramesToClear - pMixBuf->offRead);
+        cClearLen = pMixBuf->cFrames - cClearOff;
 
         AUDMIXBUF_LOG(("Clearing1: %RU32 - %RU32\n", cClearOff, cClearOff + cClearLen));
 
-        RT_BZERO(pMixBuf->pSamples + cClearOff, cClearLen * sizeof(PDMAUDIOSAMPLE));
-
-        Assert(cSamplesToClear >= cClearLen);
-        cSamplesToClear -= cClearLen;
+        RT_BZERO(pMixBuf->pFrames + cClearOff, cClearLen * sizeof(PDMAUDIOFRAME));
+
+        Assert(cFramesToClear >= cClearLen);
+        cFramesToClear -= cClearLen;
     }
 
     /* Clear beginning of buffer. */
-    if (   cSamplesToClear
+    if (   cFramesToClear
         && pMixBuf->offRead)
     {
-        Assert(pMixBuf->offRead >= cSamplesToClear);
-
-        cClearOff = pMixBuf->offRead - cSamplesToClear;
-        cClearLen = cSamplesToClear;
-
-        Assert(cClearOff + cClearLen <= pMixBuf->cSamples);
+        Assert(pMixBuf->offRead >= cFramesToClear);
+
+        cClearOff = pMixBuf->offRead - cFramesToClear;
+        cClearLen = cFramesToClear;
+
+        Assert(cClearOff + cClearLen <= pMixBuf->cFrames);
 
         AUDMIXBUF_LOG(("Clearing2: %RU32 - %RU32\n", cClearOff, cClearOff + cClearLen));
 
-        RT_BZERO(pMixBuf->pSamples + cClearOff, cClearLen * sizeof(PDMAUDIOSAMPLE));
+        RT_BZERO(pMixBuf->pFrames + cClearOff, cClearLen * sizeof(PDMAUDIOFRAME));
     }
 }
@@ -350,19 +349,19 @@
     }
 
-    if (pMixBuf->pSamples)
-    {
-        Assert(pMixBuf->cSamples);
-
-        RTMemFree(pMixBuf->pSamples);
-        pMixBuf->pSamples = NULL;
-    }
-
-    pMixBuf->cSamples = 0;
-}
-
-/**
- * Returns the size (in audio samples) of free audio buffer space.
- *
- * @return  uint32_t                Size (in audio samples) of free audio buffer space.
+    if (pMixBuf->pFrames)
+    {
+        Assert(pMixBuf->cFrames);
+
+        RTMemFree(pMixBuf->pFrames);
+        pMixBuf->pFrames = NULL;
+    }
+
+    pMixBuf->cFrames = 0;
+}
+
+/**
+ * Returns the size (in audio frames) of free audio buffer space.
+ *
+ * @return  uint32_t                Size (in audio frames) of free audio buffer space.
  * @param   pMixBuf                 Mixing buffer to return free size for.
  */
@@ -371,25 +370,25 @@
     AssertPtrReturn(pMixBuf, 0);
 
-    uint32_t cSamples, cSamplesFree;
+    uint32_t cFrames, cFramesFree;
     if (pMixBuf->pParent)
     {
         /*
-         * As a linked child buffer we want to know how many samples
+         * As a linked child buffer we want to know how many frames
          * already have been consumed by the parent.
          */
-        cSamples = pMixBuf->pParent->cSamples;
-
-        Assert(pMixBuf->cMixed <= cSamples);
-        cSamplesFree = cSamples - pMixBuf->cMixed;
+        cFrames = pMixBuf->pParent->cFrames;
+
+        Assert(pMixBuf->cMixed <= cFrames);
+        cFramesFree = cFrames - pMixBuf->cMixed;
     }
     else /* As a parent. */
     {
-        cSamples     = pMixBuf->cSamples;
-        Assert(cSamples >= pMixBuf->cUsed);
-        cSamplesFree = pMixBuf->cSamples - pMixBuf->cUsed;
-    }
-
-    AUDMIXBUF_LOG(("%s: %RU32 of %RU32\n", pMixBuf->pszName, cSamplesFree, cSamples));
-    return cSamplesFree;
+        cFrames     = pMixBuf->cFrames;
+        Assert(cFrames >= pMixBuf->cUsed);
+        cFramesFree = pMixBuf->cFrames - pMixBuf->cUsed;
+    }
+
+    AUDMIXBUF_LOG(("%s: %RU32 of %RU32\n", pMixBuf->pszName, cFramesFree, cFrames));
+    return cFramesFree;
 }
 
@@ -402,26 +401,26 @@
 uint32_t AudioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf)
 {
-    return AUDIOMIXBUF_S2B(pMixBuf, AudioMixBufFree(pMixBuf));
-}
-
-/**
- * Allocates the internal audio sample buffer.
+    return AUDIOMIXBUF_F2B(pMixBuf, AudioMixBufFree(pMixBuf));
+}
+
+/**
+ * Allocates the internal audio frame buffer.
  *
  * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to allocate sample buffer for.
- * @param   cSamples                Number of audio samples to allocate.
- */
-static int audioMixBufAlloc(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamples)
+ * @param   pMixBuf                 Mixing buffer to allocate frame buffer for.
+ * @param   cFrames                 Number of audio frames to allocate.
+ */
+static int audioMixBufAlloc(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFrames)
 {
     AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
-    AssertReturn(cSamples, VERR_INVALID_PARAMETER);
-
-    AUDMIXBUF_LOG(("%s: cSamples=%RU32\n", pMixBuf->pszName, cSamples));
-
-    size_t cbSamples = cSamples * sizeof(PDMAUDIOSAMPLE);
-    pMixBuf->pSamples = (PPDMAUDIOSAMPLE)RTMemAllocZ(cbSamples);
-    if (pMixBuf->pSamples)
-    {
-        pMixBuf->cSamples = cSamples;
+    AssertReturn(cFrames, VERR_INVALID_PARAMETER);
+
+    AUDMIXBUF_LOG(("%s: cFrames=%RU32\n", pMixBuf->pszName, cFrames));
+
+    size_t cbFrames = cFrames * sizeof(PDMAUDIOFRAME);
+    pMixBuf->pFrames = (PPDMAUDIOFRAME)RTMemAllocZ(cbFrames);
+    if (pMixBuf->pFrames)
+    {
+        pMixBuf->cFrames = cFrames;
         return VINF_SUCCESS;
     }
@@ -467,12 +466,12 @@
     } \
     \
-    DECLCALLBACK(uint32_t) audioMixBufConvFrom##_aName##Stereo(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, \
+    DECLCALLBACK(uint32_t) audioMixBufConvFrom##_aName##Stereo(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc, \
                                                                PCPDMAUDMIXBUFCONVOPTS pOpts) \
     { \
         _aType const *pSrc = (_aType const *)pvSrc; \
-        uint32_t cSamples = RT_MIN(pOpts->cSamples, cbSrc / sizeof(_aType)); \
-        AUDMIXBUF_MACRO_LOG(("cSamples=%RU32, BpS=%zu, lVol=%RU32, rVol=%RU32\n", \
-                             pOpts->cSamples, sizeof(_aType), pOpts->From.Volume.uLeft, pOpts->From.Volume.uRight)); \
-        for (uint32_t i = 0; i < cSamples; i++) \
+        uint32_t cFrames = RT_MIN(pOpts->cFrames, cbSrc / sizeof(_aType)); \
+        AUDMIXBUF_MACRO_LOG(("cFrames=%RU32, BpS=%zu, lVol=%RU32, rVol=%RU32\n", \
+                             pOpts->cFrames, sizeof(_aType), pOpts->From.Volume.uLeft, pOpts->From.Volume.uRight)); \
+        for (uint32_t i = 0; i < cFrames; i++) \
         { \
             paDst->i64LSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc++), pOpts->From.Volume.uLeft ) >> AUDIOMIXBUF_VOL_SHIFT; \
@@ -481,15 +480,15 @@
         } \
         \
-        return cSamples; \
+        return cFrames; \
     } \
     \
-    DECLCALLBACK(uint32_t) audioMixBufConvFrom##_aName##Mono(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, \
+    DECLCALLBACK(uint32_t) audioMixBufConvFrom##_aName##Mono(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc, \
                                                              PCPDMAUDMIXBUFCONVOPTS pOpts) \
     { \
         _aType const *pSrc = (_aType const *)pvSrc; \
-        const uint32_t cSamples = RT_MIN(pOpts->cSamples, cbSrc / sizeof(_aType)); \
-        AUDMIXBUF_MACRO_LOG(("cSamples=%RU32, BpS=%zu, lVol=%RU32, rVol=%RU32\n", \
-                             cSamples, sizeof(_aType), pOpts->From.Volume.uLeft, pOpts->From.Volume.uRight)); \
-        for (uint32_t i = 0; i < cSamples; i++) \
+        const uint32_t cFrames = RT_MIN(pOpts->cFrames, cbSrc / sizeof(_aType)); \
+        AUDMIXBUF_MACRO_LOG(("cFrames=%RU32, BpS=%zu, lVol=%RU32, rVol=%RU32\n", \
+                             cFrames, sizeof(_aType), pOpts->From.Volume.uLeft, pOpts->From.Volume.uRight)); \
+        for (uint32_t i = 0; i < cFrames; i++) \
         { \
             paDst->i64LSample = ASMMult2xS32RetS64((int32_t)audioMixBufClipFrom##_aName(*pSrc), pOpts->From.Volume.uLeft)  >> AUDIOMIXBUF_VOL_SHIFT; \
@@ -499,14 +498,14 @@
         } \
         \
-        return cSamples; \
+        return cFrames; \
     } \
     \
-    DECLCALLBACK(void) audioMixBufConvTo##_aName##Stereo(void *pvDst, PCPDMAUDIOSAMPLE paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) \
+    DECLCALLBACK(void) audioMixBufConvTo##_aName##Stereo(void *pvDst, PCPDMAUDIOFRAME paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) \
     { \
-        PCPDMAUDIOSAMPLE pSrc = paSrc; \
+        PCPDMAUDIOFRAME pSrc = paSrc; \
         _aType *pDst = (_aType *)pvDst; \
         _aType l, r; \
-        uint32_t cSamples = pOpts->cSamples; \
-        while (cSamples--) \
+        uint32_t cFrames = pOpts->cFrames; \
+        while (cFrames--) \
         { \
             AUDMIXBUF_MACRO_LOG(("%p: l=%RI64, r=%RI64\n", pSrc, pSrc->i64LSample, pSrc->i64RSample)); \
@@ -520,10 +519,10 @@
     } \
     \
-    DECLCALLBACK(void) audioMixBufConvTo##_aName##Mono(void *pvDst, PCPDMAUDIOSAMPLE paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) \
+    DECLCALLBACK(void) audioMixBufConvTo##_aName##Mono(void *pvDst, PCPDMAUDIOFRAME paSrc, PCPDMAUDMIXBUFCONVOPTS pOpts) \
     { \
-        PCPDMAUDIOSAMPLE pSrc = paSrc; \
+        PCPDMAUDIOFRAME pSrc = paSrc; \
         _aType *pDst = (_aType *)pvDst; \
-        uint32_t cSamples = pOpts->cSamples; \
-        while (cSamples--) \
+        uint32_t cFrames = pOpts->cFrames; \
+        while (cFrames--) \
         { \
             *pDst++ = audioMixBufClipTo##_aName((pSrc->i64LSample + pSrc->i64RSample) / 2); \
@@ -548,10 +547,10 @@
 
 #define AUDMIXBUF_MIXOP(_aName, _aOp) \
-    static void audioMixBufOp##_aName(PPDMAUDIOSAMPLE paDst, uint32_t cDstSamples, \
-                                      PPDMAUDIOSAMPLE paSrc, uint32_t cSrcSamples, \
+    static void audioMixBufOp##_aName(PPDMAUDIOFRAME paDst, uint32_t cDstFrames, \
+                                      PPDMAUDIOFRAME paSrc, uint32_t cSrcFrames, \
                                       PPDMAUDIOSTRMRATE pRate, \
                                       uint32_t *pcDstWritten, uint32_t *pcSrcRead) \
     { \
-        AUDMIXBUF_MACRO_LOG(("cSrcSamples=%RU32, cDstSamples=%RU32\n", cSrcSamples, cDstSamples)); \
+        AUDMIXBUF_MACRO_LOG(("cSrcFrames=%RU32, cDstFrames=%RU32\n", cSrcFrames, cDstFrames)); \
         AUDMIXBUF_MACRO_LOG(("Rate: srcOffset=%RU32, dstOffset=%RU32, dstInc=%RU32\n", \
                              pRate->srcOffset, \
@@ -560,7 +559,7 @@
         if (pRate->dstInc == (UINT64_C(1) + UINT32_MAX)) /* No conversion needed? */ \
         { \
-            uint32_t cSamples = RT_MIN(cSrcSamples, cDstSamples); \
-            AUDMIXBUF_MACRO_LOG(("cSamples=%RU32\n", cSamples)); \
-            for (uint32_t i = 0; i < cSamples; i++) \
+            uint32_t cFrames = RT_MIN(cSrcFrames, cDstFrames); \
+            AUDMIXBUF_MACRO_LOG(("cFrames=%RU32\n", cFrames)); \
+            for (uint32_t i = 0; i < cFrames; i++) \
             { \
                 paDst[i].i64LSample _aOp paSrc[i].i64LSample; \
@@ -569,17 +568,17 @@
             \
             if (pcDstWritten) \
-                *pcDstWritten = cSamples; \
+                *pcDstWritten = cFrames; \
             if (pcSrcRead) \
-                *pcSrcRead = cSamples; \
+                *pcSrcRead = cFrames; \
             return; \
         } \
         \
-        PPDMAUDIOSAMPLE paSrcStart = paSrc; \
-        PPDMAUDIOSAMPLE paSrcEnd   = paSrc + cSrcSamples; \
-        PPDMAUDIOSAMPLE paDstStart = paDst; \
-        PPDMAUDIOSAMPLE paDstEnd   = paDst + cDstSamples; \
-        PDMAUDIOSAMPLE  samCur     = { 0 }; \
-        PDMAUDIOSAMPLE  samOut; \
-        PDMAUDIOSAMPLE  samLast    = pRate->srcSampleLast; \
+        PPDMAUDIOFRAME paSrcStart = paSrc; \
+        PPDMAUDIOFRAME paSrcEnd   = paSrc + cSrcFrames;  \
+        PPDMAUDIOFRAME paDstStart = paDst; \
+        PPDMAUDIOFRAME paDstEnd   = paDst + cDstFrames; \
+        PDMAUDIOFRAME  frameCur   = { 0 }; \
+        PDMAUDIOFRAME  frameOut; \
+        PDMAUDIOFRAME  frameLast  = pRate->srcFrameLast; \
         \
         while (paDst < paDstEnd) \
@@ -593,5 +592,5 @@
             { \
                 Assert(paSrc <= paSrcEnd); \
-                samLast = *paSrc++; \
+                frameLast = *paSrc++; \
                 pRate->srcOffset++; \
                 if (paSrc == paSrcEnd) \
@@ -603,19 +602,19 @@
                 break; \
             \
-            samCur = *paSrc; \
+            frameCur = *paSrc; \
             \
             /* Interpolate. */ \
             int64_t iDstOffInt = pRate->dstOffset & UINT32_MAX; \
             \
-            samOut.i64LSample = (samLast.i64LSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + samCur.i64LSample * iDstOffInt) >> 32; \
-            samOut.i64RSample = (samLast.i64RSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + samCur.i64RSample * iDstOffInt) >> 32; \
+            frameOut.i64LSample = (frameLast.i64LSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + frameCur.i64LSample * iDstOffInt) >> 32; \
+            frameOut.i64RSample = (frameLast.i64RSample * ((int64_t) (INT64_C(1) << 32) - iDstOffInt) + frameCur.i64RSample * iDstOffInt) >> 32; \
             \
-            paDst->i64LSample _aOp samOut.i64LSample; \
-            paDst->i64RSample _aOp samOut.i64RSample; \
+            paDst->i64LSample _aOp frameOut.i64LSample; \
+            paDst->i64RSample _aOp frameOut.i64RSample; \
             \
             AUDMIXBUF_MACRO_LOG(("\tiDstOffInt=%RI64, l=%RI64, r=%RI64 (cur l=%RI64, r=%RI64)\n", \
                                  iDstOffInt, \
                                  paDst->i64LSample >> 32, paDst->i64RSample >> 32, \
-                                 samCur.i64LSample >> 32, samCur.i64RSample >> 32)); \
+                                 frameCur.i64LSample >> 32, frameCur.i64RSample >> 32)); \
             \
             paDst++; \
@@ -626,10 +625,10 @@
         } \
         \
-        AUDMIXBUF_MACRO_LOG(("%zu source samples -> %zu dest samples\n", paSrc - paSrcStart, paDst - paDstStart)); \
+        AUDMIXBUF_MACRO_LOG(("%zu source frames -> %zu dest frames\n", paSrc - paSrcStart, paDst - paDstStart)); \
         \
-        pRate->srcSampleLast = samLast; \
+        pRate->srcFrameLast = frameLast; \
         \
         AUDMIXBUF_MACRO_LOG(("pRate->srcSampleLast l=%RI64, r=%RI64\n", \
-                              pRate->srcSampleLast.i64LSample, pRate->srcSampleLast.i64RSample)); \
+                              pRate->srcFrameLast.i64LSample, pRate->srcFrameLast.i64RSample)); \
         \
         if (pcDstWritten) \
@@ -651,16 +650,16 @@
 /** Dummy conversion used when the source is muted. */
 static DECLCALLBACK(uint32_t)
-audioMixBufConvFromSilence(PPDMAUDIOSAMPLE paDst, const void *pvSrc, uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts)
+audioMixBufConvFromSilence(PPDMAUDIOFRAME paDst, const void *pvSrc, uint32_t cbSrc, PCPDMAUDMIXBUFCONVOPTS pOpts)
 {
     RT_NOREF(cbSrc, pvSrc);
 
     /* Internally zero always corresponds to silence. */
-    RT_BZERO(paDst, pOpts->cSamples * sizeof(paDst[0]));
-    return pOpts->cSamples;
+    RT_BZERO(paDst, pOpts->cFrames * sizeof(paDst[0]));
+    return pOpts->cFrames;
 }
 
 /**
  * Looks up the matching conversion (macro) routine for converting
- * audio samples from a source format.
+ * audio frames from a source format.
  *
  ** @todo Speed up the lookup by binding it to the actual stream state.
@@ -722,5 +721,5 @@
 /**
  * Looks up the matching conversion (macro) routine for converting
- * audio samples to a destination format.
+ * audio frames to a destination format.
  *
  ** @todo Speed up the lookup by binding it to the actual stream state.
@@ -811,7 +810,7 @@
  * @param   pszName                 Name of mixing buffer for easier identification. Optional.
  * @param   pProps                  PCM audio properties to use for the mixing buffer.
- * @param   cSamples                Maximum number of audio samples the mixing buffer can hold.
- */
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cSamples)
+ * @param   cFrames                 Maximum number of audio frames the mixing buffer can hold.
+ */
+int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cFrames)
 {
     AssertPtrReturn(pMixBuf, VERR_INVALID_POINTER);
@@ -824,6 +823,6 @@
     pMixBuf->cChildren = 0;
 
-    pMixBuf->pSamples = NULL;
-    pMixBuf->cSamples = 0;
+    pMixBuf->pFrames = NULL;
+    pMixBuf->cFrames = 0;
 
     pMixBuf->offRead  = 0;
@@ -863,12 +862,12 @@
                    RT_BOOL(AUDMIXBUF_FMT_SIGNED(pMixBuf->AudioFmt))));
 
-    return audioMixBufAlloc(pMixBuf, cSamples);
-}
-
-/**
- * Returns @c true if there are any audio samples available for processing,
+    return audioMixBufAlloc(pMixBuf, cFrames);
+}
+
+/**
+ * Returns @c true if there are any audio frames available for processing,
  * @c false if not.
  *
- * @return  bool                    @c true if there are any audio samples available for processing, @c false if not.
+ * @return  bool                    @c true if there are any audio frames available for processing, @c false if not.
  * @param   pMixBuf                 Mixing buffer to return value for.
  */
@@ -926,5 +925,5 @@
 
     AssertMsgReturn(AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt),
-                    ("Parent sample frequency (Hz) not set\n"), VERR_INVALID_PARAMETER);
+                    ("Parent frame frequency (Hz) not set\n"), VERR_INVALID_PARAMETER);
     AssertMsgReturn(AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
                     ("Buffer sample frequency (Hz) not set\n"), VERR_INVALID_PARAMETER);
@@ -950,17 +949,17 @@
     int rc = VINF_SUCCESS;
 #if 0
-    uint32_t cSamples = (uint32_t)RT_MIN(  ((uint64_t)pParent->cSamples << 32)
-                                         / pMixBuf->iFreqRatio, _64K /* 64K samples max. */);
-    if (!cSamples)
-        cSamples = pParent->cSamples;
+    uint32_t cFrames = (uint32_t)RT_MIN(  ((uint64_t)pParent->cFrames << 32)
+                                         / pMixBuf->iFreqRatio, _64K /* 64K frames max. */);
+    if (!cFrames)
+        cFrames = pParent->cFrames;
 
     int rc = VINF_SUCCESS;
 
-    if (cSamples != pMixBuf->cSamples)
-    {
-        AUDMIXBUF_LOG(("%s: Reallocating samples %RU32 -> %RU32\n",
-                       pMixBuf->pszName, pMixBuf->cSamples, cSamples));
-
-        uint32_t cbSamples = cSamples * sizeof(PDMAUDIOSAMPLE);
+    if (cFrames != pMixBuf->cFrames)
+    {
+        AUDMIXBUF_LOG(("%s: Reallocating frames %RU32 -> %RU32\n",
+                       pMixBuf->pszName, pMixBuf->cFrames, cFrames));
+
+        uint32_t cbSamples = cFrames * sizeof(PDMAUDIOSAMPLE);
         Assert(cbSamples);
         pMixBuf->pSamples = (PPDMAUDIOSAMPLE)RTMemRealloc(pMixBuf->pSamples, cbSamples);
@@ -970,5 +969,5 @@
         if (RT_SUCCESS(rc))
         {
-            pMixBuf->cSamples = cSamples;
+            pMixBuf->cFrames = cFrames;
 
             /* Make sure to zero the reallocated buffer so that it can be
@@ -994,11 +993,11 @@
                                /            AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt);
 
-        AUDMIXBUF_LOG(("uThisHz=%RU32, uParentHz=%RU32, iFreqRatio=0x%RX64 (%RI64), uRateInc=0x%RX64 (%RU64), cSamples=%RU32 (%RU32 parent)\n",
+        AUDMIXBUF_LOG(("uThisHz=%RU32, uParentHz=%RU32, iFreqRatio=0x%RX64 (%RI64), uRateInc=0x%RX64 (%RU64), cFrames=%RU32 (%RU32 parent)\n",
                        AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
                        AUDMIXBUF_FMT_SAMPLE_FREQ(pParent->AudioFmt),
                        pMixBuf->iFreqRatio, pMixBuf->iFreqRatio,
                        pMixBuf->pRate->dstInc, pMixBuf->pRate->dstInc,
-                       pMixBuf->cSamples,
-                       pParent->cSamples));
+                       pMixBuf->cFrames,
+                       pParent->cFrames));
         AUDMIXBUF_LOG(("%s (%RU32Hz) -> %s (%RU32Hz)\n",
                        pMixBuf->pszName, AUDMIXBUF_FMT_SAMPLE_FREQ(pMixBuf->AudioFmt),
@@ -1010,14 +1009,14 @@
 
 /**
- * Returns number of available live samples, that is, samples that
+ * Returns number of available live frames, that is, frames that
  * have been written into the mixing buffer but not have been processed yet.
  *
- * For a parent buffer, this simply returns the currently used number of samples
+ * For a parent buffer, this simply returns the currently used number of frames
  * in the buffer.
  *
- * For a child buffer, this returns the number of samples which have been mixed
+ * For a child buffer, this returns the number of frames which have been mixed
  * to the parent and were not processed by the parent yet.
  *
- * @return  uint32_t                Number of live samples available.
+ * @return  uint32_t                Number of live frames available.
  * @param   pMixBuf                 Mixing buffer to return value for.
  */
@@ -1027,5 +1026,5 @@
 
 #ifdef RT_STRICT
-    uint32_t cSamples;
+    uint32_t cFrames;
 #endif
     uint32_t cAvail;
@@ -1033,8 +1032,8 @@
     {
 #ifdef RT_STRICT
-        /* Use the sample count from the parent, as
-         * pMixBuf->cMixed specifies the sample count
-         * in parent samples. */
-        cSamples = pMixBuf->pParent->cSamples;
+        /* Use the frame count from the parent, as
+         * pMixBuf->cMixed specifies the frame count
+         * in parent frames. */
+        cFrames = pMixBuf->pParent->cFrames;
 #endif
         cAvail   = pMixBuf->cMixed;
@@ -1043,15 +1042,15 @@
     {
 #ifdef RT_STRICT
-        cSamples = pMixBuf->cSamples;
+        cFrames = pMixBuf->cFrames;
 #endif
         cAvail   = pMixBuf->cUsed;
     }
 
-    Assert(cAvail <= cSamples);
+    Assert(cAvail <= cFrames);
     return cAvail;
 }
 
 /**
- * Mixes audio samples from a source mixing buffer to a destination mixing buffer.
+ * Mixes audio frames from a source mixing buffer to a destination mixing buffer.
  *
  * @return  IPRT status code.
@@ -1061,9 +1060,9 @@
  * @param   pDst                    Destination mixing buffer.
  * @param   pSrc                    Source mixing buffer.
- * @param   cSrcOff                 Offset of source audio samples to mix.
- * @param   cSrcSamples             Number of source audio samples to mix.
- * @param   pcSrcMixed              Number of source audio samples successfully mixed. Optional.
- */
-static int audioMixBufMixTo(PPDMAUDIOMIXBUF pDst, PPDMAUDIOMIXBUF pSrc, uint32_t cSrcOff, uint32_t cSrcSamples,
+ * @param   cSrcOff                 Offset of source audio frames to mix.
+ * @param   cSrcFrames              Number of source audio frames to mix.
+ * @param   pcSrcMixed              Number of source audio frames successfully mixed. Optional.
+ */
+static int audioMixBufMixTo(PPDMAUDIOMIXBUF pDst, PPDMAUDIOMIXBUF pSrc, uint32_t cSrcOff, uint32_t cSrcFrames,
                             uint32_t *pcSrcMixed)
 {
@@ -1077,8 +1076,8 @@
     uint32_t cWrittenTotal = 0;
 
-    Assert(pSrc->cMixed <= pDst->cSamples);
+    Assert(pSrc->cMixed <= pDst->cFrames);
 
     Assert(pSrc->cUsed >= pDst->cMixed);
-    Assert(pDst->cUsed <= pDst->cSamples);
+    Assert(pDst->cUsed <= pDst->cFrames);
 
     uint32_t offSrcRead  = cSrcOff;
@@ -1087,6 +1086,6 @@
     uint32_t cDstMixed   = pSrc->cMixed;
 
-    uint32_t cSrcAvail   = RT_MIN(cSrcSamples, pSrc->cUsed);
-    uint32_t cDstAvail   = pDst->cSamples - pDst->cUsed; /** @todo Use pDst->cMixed later? */
+    uint32_t cSrcAvail   = RT_MIN(cSrcFrames, pSrc->cUsed);
+    uint32_t cDstAvail   = pDst->cFrames - pDst->cUsed; /** @todo Use pDst->cMixed later? */
 
     AUDMIXBUF_LOG(("%s (%RU32 available) -> %s (%RU32 available)\n",
@@ -1112,6 +1111,6 @@
     while (cSrcAvail && cDstAvail)
     {
-        cSrcToRead  = RT_MIN(cSrcAvail, pSrc->cSamples - offSrcRead);
-        cDstToWrite = RT_MIN(cDstAvail, pDst->cSamples - offDstWrite);
+        cSrcToRead  = RT_MIN(cSrcAvail, pSrc->cFrames - offSrcRead);
+        cDstToWrite = RT_MIN(cDstAvail, pDst->cFrames - offDstWrite);
 
         AUDMIXBUF_LOG(("\tSource: %RU32 @ %RU32 -> reading %RU32\n", cSrcAvail, offSrcRead, cSrcToRead));
@@ -1126,12 +1125,12 @@
         cDstWritten = cSrcRead = 0;
 
-        Assert(offSrcRead < pSrc->cSamples);
-        Assert(offSrcRead + cSrcToRead <= pSrc->cSamples);
-
-        Assert(offDstWrite < pDst->cSamples);
-        Assert(offDstWrite + cDstToWrite <= pDst->cSamples);
-
-        audioMixBufOpAssign(pDst->pSamples + offDstWrite, cDstToWrite,
-                            pSrc->pSamples + offSrcRead,  cSrcToRead,
+        Assert(offSrcRead < pSrc->cFrames);
+        Assert(offSrcRead + cSrcToRead <= pSrc->cFrames);
+
+        Assert(offDstWrite < pDst->cFrames);
+        Assert(offDstWrite + cDstToWrite <= pDst->cFrames);
+
+        audioMixBufOpAssign(pDst->pFrames + offDstWrite, cDstToWrite,
+                            pSrc->pFrames + offSrcRead,  cSrcToRead,
                             pSrc->pRate, &cDstWritten, &cSrcRead);
 
@@ -1139,6 +1138,6 @@
         cWrittenTotal += cDstWritten;
 
-        offSrcRead     = (offSrcRead  + cSrcRead)    % pSrc->cSamples;
-        offDstWrite    = (offDstWrite + cDstWritten) % pDst->cSamples;
+        offSrcRead     = (offSrcRead  + cSrcRead)    % pSrc->cFrames;
+        offDstWrite    = (offDstWrite + cDstWritten) % pDst->cFrames;
 
         cDstMixed     += cDstWritten;
@@ -1159,22 +1158,22 @@
     pSrc->cUsed      -= RT_MIN(pSrc->cUsed, cReadTotal);
 
-    /* Note: Always count in parent samples, as the rate can differ! */
-    pSrc->cMixed      = RT_MIN(cDstMixed, pDst->cSamples);
+    /* Note: Always count in parent frames, as the rate can differ! */
+    pSrc->cMixed      = RT_MIN(cDstMixed, pDst->cFrames);
 
     pDst->offWrite    = offDstWrite;
-    Assert(pDst->offWrite <= pDst->cSamples);
-    Assert((pDst->cUsed + cWrittenTotal) <= pDst->cSamples);
+    Assert(pDst->offWrite <= pDst->cFrames);
+    Assert((pDst->cUsed + cWrittenTotal) <= pDst->cFrames);
     pDst->cUsed      += cWrittenTotal;
 
-    /* If there are more used samples than fitting in the destination buffer,
+    /* If there are more used frames than fitting in the destination buffer,
      * adjust the values accordingly.
      *
      * This can happen if this routine has been called too often without
      * actually processing the destination buffer in between. */
-    if (pDst->cUsed > pDst->cSamples)
-    {
-        LogFunc(("%s: Warning: Destination buffer used %RU32 / %RU32 samples\n", pDst->pszName, pDst->cUsed, pDst->cSamples));
+    if (pDst->cUsed > pDst->cFrames)
+    {
+        LogFunc(("%s: Warning: Destination buffer used %RU32 / %RU32 frames\n", pDst->pszName, pDst->cUsed, pDst->cFrames));
         pDst->offWrite     = 0;
-        pDst->cUsed        = pDst->cSamples;
+        pDst->cUsed        = pDst->cFrames;
 
         rc = VERR_BUFFER_OVERFLOW;
@@ -1185,5 +1184,5 @@
     audioMixBufDbgValidate(pDst);
 
-    Assert(pSrc->cMixed <= pDst->cSamples);
+    Assert(pSrc->cMixed <= pDst->cFrames);
 #endif
 
@@ -1200,12 +1199,12 @@
         Assert(sizeof(auBuf) % 4 == 0);
 
-        uint32_t cToRead = RT_MIN(AUDIOMIXBUF_B2S(pDst, sizeof(auBuf)), RT_MIN(cLeft, pDst->cSamples - offRead));
+        uint32_t cToRead = RT_MIN(AUDIOMIXBUF_B2F(pDst, sizeof(auBuf)), RT_MIN(cLeft, pDst->cFrames - offRead));
         Assert(cToRead <= pDst->cUsed);
 
         PDMAUDMIXBUFCONVOPTS convOpts;
         RT_ZERO(convOpts);
-        convOpts.cSamples = cToRead;
-
-        pDst->pfnConvTo(auBuf, pDst->pSamples + offRead, &convOpts);
+        convOpts.cFrames = cToRead;
+
+        pDst->pfnConvTo(auBuf, pDst->pFrames + offRead, &convOpts);
 
         RTFILE fh;
@@ -1214,9 +1213,9 @@
         if (RT_SUCCESS(rc2))
         {
-            RTFileWrite(fh, auBuf, AUDIOMIXBUF_S2B(pDst, cToRead), NULL);
+            RTFileWrite(fh, auBuf, AUDIOMIXBUF_F2B(pDst, cToRead), NULL);
             RTFileClose(fh);
         }
 
-        offRead  = (offRead + cToRead) % pDst->cSamples;
+        offRead  = (offRead + cToRead) % pDst->cFrames;
         cLeft   -= cToRead;
     }
@@ -1236,13 +1235,13 @@
 
 /**
- * Mixes audio samples down to the parent mixing buffer, extended version.
+ * Mixes audio frames down to the parent mixing buffer, extended version.
  *
  * @return  IPRT status code. See audioMixBufMixTo() for a more detailed explanation.
  * @param   pMixBuf                 Source mixing buffer to mix to its parent.
- * @param   cSrcOffset              Offset (in samples) of source mixing buffer.
- * @param   cSrcSamples             Number of source audio samples to mix to its parent.
- * @param   pcSrcMixed              Number of source audio samples successfully mixed. Optional.
- */
-int AudioMixBufMixToParentEx(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcOffset, uint32_t cSrcSamples, uint32_t *pcSrcMixed)
+ * @param   cSrcOffset              Offset (in frames) of source mixing buffer.
+ * @param   cSrcFrames              Number of source audio frames to mix to its parent.
+ * @param   pcSrcMixed              Number of source audio frames successfully mixed. Optional.
+ */
+int AudioMixBufMixToParentEx(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcOffset, uint32_t cSrcFrames, uint32_t *pcSrcMixed)
 {
     AssertMsgReturn(VALID_PTR(pMixBuf->pParent),
@@ -1250,18 +1249,18 @@
                     VERR_INVALID_PARAMETER);
 
-    return audioMixBufMixTo(pMixBuf->pParent, pMixBuf, cSrcOffset, cSrcSamples, pcSrcMixed);
-}
-
-/**
- * Mixes audio samples down to the parent mixing buffer.
+    return audioMixBufMixTo(pMixBuf->pParent, pMixBuf, cSrcOffset, cSrcFrames, pcSrcMixed);
+}
+
+/**
+ * Mixes audio frames down to the parent mixing buffer.
  *
  * @return  IPRT status code. See audioMixBufMixTo() for a more detailed explanation.
  * @param   pMixBuf                 Source mixing buffer to mix to its parent.
- * @param   cSrcSamples             Number of source audio samples to mix to its parent.
- * @param   pcSrcMixed              Number of source audio samples successfully mixed. Optional.
- */
-int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcSamples, uint32_t *pcSrcMixed)
-{
-    return audioMixBufMixTo(pMixBuf->pParent, pMixBuf, pMixBuf->offRead, cSrcSamples, pcSrcMixed);
+ * @param   cSrcFrames              Number of source audio frames to mix to its parent.
+ * @param   pcSrcMixed              Number of source audio frames successfully mixed. Optional.
+ */
+int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcFrames, uint32_t *pcSrcMixed)
+{
+    return audioMixBufMixTo(pMixBuf->pParent, pMixBuf, pMixBuf->offRead, cSrcFrames, pcSrcMixed);
 }
 
@@ -1281,5 +1280,5 @@
     Log(("%s: %*s[%s] %s: offRead=%RU32, offWrite=%RU32, cMixed=%RU32 -> %RU32/%RU32\n",
          pszFunc, uIdtLvl * 4, "", fIsParent ? "PARENT" : "CHILD",
-         pMixBuf->pszName, pMixBuf->offRead, pMixBuf->offWrite, pMixBuf->cMixed, pMixBuf->cUsed, pMixBuf->cSamples));
+         pMixBuf->pszName, pMixBuf->offRead, pMixBuf->offWrite, pMixBuf->cMixed, pMixBuf->cUsed, pMixBuf->cFrames));
 }
 
@@ -1292,12 +1291,12 @@
 DECL_FORCE_INLINE(bool) audioMixBufDbgValidate(PPDMAUDIOMIXBUF pMixBuf)
 {
-    //const uint32_t offReadEnd  = (pMixBuf->offRead + pMixBuf->cUsed) % pMixBuf->cSamples;
-    //const uint32_t offWriteEnd = (pMixBuf->offWrite + (pMixBuf->cSamples - pMixBuf->cUsed)) % pMixBuf->cSamples;
+    //const uint32_t offReadEnd  = (pMixBuf->offRead + pMixBuf->cUsed) % pMixBuf->cFrames;
+    //const uint32_t offWriteEnd = (pMixBuf->offWrite + (pMixBuf->cFrames - pMixBuf->cUsed)) % pMixBuf->cFrames;
 
     bool fValid = true;
 
-    AssertStmt(pMixBuf->offRead  <= pMixBuf->cSamples, fValid = false);
-    AssertStmt(pMixBuf->offWrite <= pMixBuf->cSamples, fValid = false);
-    AssertStmt(pMixBuf->cUsed    <= pMixBuf->cSamples, fValid = false);
+    AssertStmt(pMixBuf->offRead  <= pMixBuf->cFrames, fValid = false);
+    AssertStmt(pMixBuf->offWrite <= pMixBuf->cFrames, fValid = false);
+    AssertStmt(pMixBuf->cUsed    <= pMixBuf->cFrames, fValid = false);
 
     if (pMixBuf->offWrite > pMixBuf->offRead)
@@ -1308,5 +1307,5 @@
     else if (pMixBuf->offWrite < pMixBuf->offRead)
     {
-        if (pMixBuf->offWrite + pMixBuf->cSamples - pMixBuf->offRead != pMixBuf->cUsed)
+        if (pMixBuf->offWrite + pMixBuf->cFrames - pMixBuf->offRead != pMixBuf->cUsed)
             fValid = false;
     }
@@ -1409,5 +1408,5 @@
 
 /**
- * Returns the total number of samples used.
+ * Returns the total number of frames used.
  *
  * @return  uint32_t
@@ -1421,9 +1420,9 @@
 
 /**
- * Reads audio samples at a specific offset.
+ * Reads audio frames at a specific offset.
  *
  * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
- * @param   offSamples              Offset (in audio samples) to start reading from.
+ * @param   pMixBuf                 Mixing buffer to read audio frames from.
+ * @param   offFrames               Offset (in audio frames) to start reading from.
  * @param   pvBuf                   Pointer to buffer to write output to.
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
@@ -1431,21 +1430,21 @@
  */
 int AudioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf,
-                      uint32_t offSamples,
+                      uint32_t offFrames,
                       void *pvBuf, uint32_t cbBuf,
                       uint32_t *pcbRead)
 {
     return AudioMixBufReadAtEx(pMixBuf, pMixBuf->AudioFmt,
-                               offSamples, pvBuf, cbBuf, pcbRead);
-}
-
-/**
- * Reads audio samples at a specific offset.
+                               offFrames, pvBuf, cbBuf, pcbRead);
+}
+
+/**
+ * Reads audio frames at a specific offset.
  * If the audio format of the mixing buffer and the requested audio format do
  * not match the output will be converted accordingly.
  *
  * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
+ * @param   pMixBuf                 Mixing buffer to read audio frames from.
  * @param   enmFmt                  Audio format to use for output.
- * @param   offSamples              Offset (in audio samples) to start reading from.
+ * @param   offFrames               Offset (in audio frames) to start reading from.
  * @param   pvBuf                   Pointer to buffer to write output to.
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
@@ -1453,5 +1452,5 @@
  */
 int AudioMixBufReadAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                        uint32_t offSamples,
+                        uint32_t offFrames,
                         void *pvBuf, uint32_t cbBuf,
                         uint32_t *pcbRead)
@@ -1461,13 +1460,13 @@
     /* pcbRead is optional. */
 
-    uint32_t cDstSamples = pMixBuf->cSamples;
+    uint32_t cDstFrames = pMixBuf->cFrames;
     uint32_t cLive = pMixBuf->cUsed;
 
-    uint32_t cDead = cDstSamples - cLive;
-    uint32_t cToProcess = (uint32_t)AUDIOMIXBUF_S2S_RATIO(pMixBuf, cDead);
-    cToProcess = RT_MIN(cToProcess, AUDIOMIXBUF_B2S(pMixBuf, cbBuf));
-
-    AUDMIXBUF_LOG(("%s: offSamples=%RU32, cLive=%RU32, cDead=%RU32, cToProcess=%RU32\n",
-                   pMixBuf->pszName, offSamples, cLive, cDead, cToProcess));
+    uint32_t cDead = cDstFrames - cLive;
+    uint32_t cToProcess = (uint32_t)AUDIOMIXBUF_F2F_RATIO(pMixBuf, cDead);
+    cToProcess = RT_MIN(cToProcess, AUDIOMIXBUF_B2F(pMixBuf, cbBuf));
+
+    AUDMIXBUF_LOG(("%s: offFrames=%RU32, cLive=%RU32, cDead=%RU32, cToProcess=%RU32\n",
+                   pMixBuf->pszName, offFrames, cLive, cDead, cToProcess));
 
     int rc;
@@ -1486,7 +1485,7 @@
             /* Note: No volume handling/conversion done in the conversion-to macros (yet). */
 
-            convOpts.cSamples = cToProcess;
-
-            pfnConvTo(pvBuf, pMixBuf->pSamples + offSamples, &convOpts);
+            convOpts.cFrames = cToProcess;
+
+            pfnConvTo(pvBuf, pMixBuf->pFrames + offFrames, &convOpts);
 
 #ifdef DEBUG
@@ -1507,19 +1506,19 @@
     {
         if (pcbRead)
-            *pcbRead = AUDIOMIXBUF_S2B(pMixBuf, cToProcess);
-    }
-
-    AUDMIXBUF_LOG(("cbRead=%RU32, rc=%Rrc\n", AUDIOMIXBUF_S2B(pMixBuf, cToProcess), rc));
+            *pcbRead = AUDIOMIXBUF_F2B(pMixBuf, cToProcess);
+    }
+
+    AUDMIXBUF_LOG(("cbRead=%RU32, rc=%Rrc\n", AUDIOMIXBUF_F2B(pMixBuf, cToProcess), rc));
     return rc;
 }
 
 /**
- * Reads audio samples. The audio format of the mixing buffer will be used.
+ * Reads audio frames. The audio format of the mixing buffer will be used.
  *
  * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
+ * @param   pMixBuf                 Mixing buffer to read audio frames from.
  * @param   pvBuf                   Pointer to buffer to write output to.
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcRead                  Number of audio samples read. Optional.
+ * @param   pcRead                  Number of audio frames read. Optional.
  */
 int AudioMixBufReadCirc(PPDMAUDIOMIXBUF pMixBuf, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
@@ -1529,14 +1528,14 @@
 
 /**
- * Reads audio samples in a specific audio format.
+ * Reads audio frames in a specific audio format.
  * If the audio format of the mixing buffer and the requested audio format do
  * not match the output will be converted accordingly.
  *
  * @return  IPRT status code.
- * @param   pMixBuf                 Mixing buffer to read audio samples from.
+ * @param   pMixBuf                 Mixing buffer to read audio frames from.
  * @param   enmFmt                  Audio format to use for output.
  * @param   pvBuf                   Pointer to buffer to write output to.
  * @param   cbBuf                   Size (in bytes) of buffer to write to.
- * @param   pcRead                  Number of audio samples read. Optional.
+ * @param   pcRead                  Number of audio frames read. Optional.
  */
 int AudioMixBufReadCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt, void *pvBuf, uint32_t cbBuf, uint32_t *pcRead)
@@ -1547,11 +1546,11 @@
     /* pcRead is optional. */
 
-    /* Make sure that we at least have space for a full audio sample. */
-    AssertReturn(AUDIOMIXBUF_B2S(pMixBuf, cbBuf), VERR_INVALID_PARAMETER);
-
-    uint32_t cToRead = RT_MIN(pMixBuf->cUsed, AUDIOMIXBUF_B2S(pMixBuf, cbBuf));
-
-    AUDMIXBUF_LOG(("%s: cbBuf=%RU32 (%RU32 samples), cToRead=%RU32, fmtSrc=0x%x, fmtDst=0x%x\n",
-                   pMixBuf->pszName, cbBuf, AUDIOMIXBUF_B2S(pMixBuf, cbBuf), cToRead, pMixBuf->AudioFmt, enmFmt));
+    /* Make sure that we at least have space for a full audio frame. */
+    AssertReturn(AUDIOMIXBUF_B2F(pMixBuf, cbBuf), VERR_INVALID_PARAMETER);
+
+    uint32_t cToRead = RT_MIN(pMixBuf->cUsed, AUDIOMIXBUF_B2F(pMixBuf, cbBuf));
+
+    AUDMIXBUF_LOG(("%s: cbBuf=%RU32 (%RU32 frames), cToRead=%RU32, fmtSrc=0x%x, fmtDst=0x%x\n",
+                   pMixBuf->pszName, cbBuf, AUDIOMIXBUF_B2F(pMixBuf, cbBuf), cToRead, pMixBuf->AudioFmt, enmFmt));
 
     if (!cToRead)
@@ -1577,14 +1576,14 @@
     }
 
-    cToRead = RT_MIN(cToRead, pMixBuf->cSamples - pMixBuf->offRead);
+    cToRead = RT_MIN(cToRead, pMixBuf->cFrames - pMixBuf->offRead);
     if (cToRead)
     {
         PDMAUDMIXBUFCONVOPTS convOpts;
         RT_ZERO(convOpts);
-        convOpts.cSamples = cToRead;
+        convOpts.cFrames = cToRead;
 
         AUDMIXBUF_LOG(("cToRead=%RU32\n", cToRead));
 
-        pfnConvTo(pvBuf, pMixBuf->pSamples + pMixBuf->offRead, &convOpts);
+        pfnConvTo(pvBuf, pMixBuf->pFrames + pMixBuf->offRead, &convOpts);
 
 #ifdef AUDIOMIXBUF_DEBUG_DUMP_PCM_DATA
@@ -1594,9 +1593,9 @@
         if (RT_SUCCESS(rc2))
         {
-            RTFileWrite(fh, pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cToRead), NULL);
+            RTFileWrite(fh, pvBuf, AUDIOMIXBUF_F2B(pMixBuf, cToRead), NULL);
             RTFileClose(fh);
         }
 #endif
-        pMixBuf->offRead  = (pMixBuf->offRead + cToRead) % pMixBuf->cSamples;
+        pMixBuf->offRead  = (pMixBuf->offRead + cToRead) % pMixBuf->cFrames;
         Assert(pMixBuf->cUsed >= cToRead);
         pMixBuf->cUsed   -= cToRead;
@@ -1610,5 +1609,5 @@
 #endif
 
-    AUDMIXBUF_LOG(("cRead=%RU32 (%RU32 bytes)\n", cToRead, AUDIOMIXBUF_S2B(pMixBuf, cToRead)));
+    AUDMIXBUF_LOG(("cRead=%RU32 (%RU32 bytes)\n", cToRead, AUDIOMIXBUF_F2B(pMixBuf, cToRead)));
     return VINF_SUCCESS;
 }
@@ -1664,7 +1663,7 @@
 
 /**
- * Returns the maximum amount of audio samples this buffer can hold.
- *
- * @return  uint32_t                Size (in audio samples) the mixing buffer can hold.
+ * Returns the maximum amount of audio frames this buffer can hold.
+ *
+ * @return  uint32_t                Size (in audio frames) the mixing buffer can hold.
  * @param   pMixBuf                 Mixing buffer to retrieve maximum for.
  */
@@ -1672,5 +1671,5 @@
 {
     AssertPtrReturn(pMixBuf, 0);
-    return pMixBuf->cSamples;
+    return pMixBuf->cFrames;
 }
 
@@ -1684,5 +1683,5 @@
 {
     AssertPtrReturn(pMixBuf, 0);
-    return AUDIOMIXBUF_S2B(pMixBuf, pMixBuf->cSamples);
+    return AUDIOMIXBUF_F2B(pMixBuf, pMixBuf->cFrames);
 }
 
@@ -1749,24 +1748,24 @@
 
 /**
- * Writes audio samples at a specific offset.
+ * Writes audio frames at a specific offset.
  * The sample format being written must match the format of the mixing buffer.
  *
  * @return  IPRT status code.
  * @param   pMixBuf                 Pointer to mixing buffer to write to.
- * @param   offSamples              Offset (in samples) starting to write at.
+ * @param   offFrames               Offset (in frames) starting to write at.
  * @param   pvBuf                   Pointer to audio buffer to be written.
  * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
- */
-int AudioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten)
-{
-    return AudioMixBufWriteAtEx(pMixBuf, pMixBuf->AudioFmt, offSamples, pvBuf, cbBuf, pcWritten);
-}
-
-/**
- * Writes audio samples at a specific offset.
+ * @param   pcWritten               Returns number of audio frames written. Optional.
+ */
+int AudioMixBufWriteAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offFrames, const void *pvBuf, uint32_t cbBuf, uint32_t *pcWritten)
+{
+    return AudioMixBufWriteAtEx(pMixBuf, pMixBuf->AudioFmt, offFrames, pvBuf, cbBuf, pcWritten);
+}
+
+/**
+ * Writes audio frames at a specific offset.
  *
  * Note that this operation also modifies the current read and write position
- * to \a offSamples + written samples on success.
+ * to \a offFrames + written frames on success.
  *
  * The audio sample format to be written can be different from the audio format
@@ -1776,11 +1775,11 @@
  * @param   pMixBuf                 Pointer to mixing buffer to write to.
  * @param   enmFmt                  Audio format supplied in the buffer.
- * @param   offSamples              Offset (in samples) starting to write at.
+ * @param   offFrames               Offset (in frames) starting to write at.
  * @param   pvBuf                   Pointer to audio buffer to be written.
  * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
+ * @param   pcWritten               Returns number of audio frames written. Optional.
  */
 int AudioMixBufWriteAtEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
-                         uint32_t offSamples, const void *pvBuf, uint32_t cbBuf,
+                         uint32_t offFrames, const void *pvBuf, uint32_t cbBuf,
                          uint32_t *pcWritten)
 {
@@ -1790,5 +1789,5 @@
     /* pcbWritten is optional. */
 
-    if (offSamples >= pMixBuf->cSamples)
+    if (offFrames >= pMixBuf->cFrames)
     {
         if (pcWritten)
@@ -1800,5 +1799,5 @@
      * Adjust cToWrite so we don't overflow our buffers.
      */
-    uint32_t cToWrite = RT_MIN(AUDIOMIXBUF_B2S(pMixBuf, cbBuf), pMixBuf->cSamples - offSamples);
+    uint32_t cToWrite = RT_MIN(AUDIOMIXBUF_B2F(pMixBuf, cbBuf), pMixBuf->cFrames - offFrames);
 
 #ifdef AUDIOMIXBUF_DEBUG_DUMP_PCM_DATA
@@ -1811,5 +1810,5 @@
     if (RT_SUCCESS(rc2))
     {
-        RTFileWrite(hFile, pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cToWrite), NULL);
+        RTFileWrite(hFile, pvBuf, AUDIOMIXBUF_F2B(pMixBuf, cToWrite), NULL);
         RTFileClose(hFile);
     }
@@ -1838,10 +1837,10 @@
         PDMAUDMIXBUFCONVOPTS convOpts;
 
-        convOpts.cSamples           = cToWrite;
+        convOpts.cFrames           = cToWrite;
         convOpts.From.Volume.fMuted = pMixBuf->Volume.fMuted;
         convOpts.From.Volume.uLeft  = pMixBuf->Volume.uLeft;
         convOpts.From.Volume.uRight = pMixBuf->Volume.uRight;
 
-        cWritten = pfnConvFrom(pMixBuf->pSamples + offSamples, pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cToWrite), &convOpts);
+        cWritten = pfnConvFrom(pMixBuf->pFrames + offFrames, pvBuf, AUDIOMIXBUF_F2B(pMixBuf, cToWrite), &convOpts);
     }
     else
@@ -1855,13 +1854,13 @@
     }
 
-    AUDMIXBUF_LOG(("%s: offSamples=%RU32, cbBuf=%RU32, cToWrite=%RU32 (%zu bytes), cWritten=%RU32 (%zu bytes), rc=%Rrc\n",
-                   pMixBuf->pszName, offSamples, cbBuf,
-                   cToWrite, AUDIOMIXBUF_S2B(pMixBuf, cToWrite),
-                   cWritten, AUDIOMIXBUF_S2B(pMixBuf, cWritten), rc));
+    AUDMIXBUF_LOG(("%s: offFrames=%RU32, cbBuf=%RU32, cToWrite=%RU32 (%zu bytes), cWritten=%RU32 (%zu bytes), rc=%Rrc\n",
+                   pMixBuf->pszName, offFrames, cbBuf,
+                   cToWrite, AUDIOMIXBUF_F2B(pMixBuf, cToWrite),
+                   cWritten, AUDIOMIXBUF_F2B(pMixBuf, cWritten), rc));
 
     if (RT_SUCCESS(rc))
     {
-        pMixBuf->offRead  = offSamples % pMixBuf->cSamples;
-        pMixBuf->offWrite = (offSamples + cWritten) % pMixBuf->cSamples;
+        pMixBuf->offRead  = offFrames % pMixBuf->cFrames;
+        pMixBuf->offWrite = (offFrames + cWritten) % pMixBuf->cFrames;
         pMixBuf->cUsed    = cWritten;
         pMixBuf->cMixed   = 0;
@@ -1880,14 +1879,14 @@
 
 /**
- * Writes audio samples.
+ * Writes audio frames.
  *
  * The sample format being written must match the format of the mixing buffer.
  *
- * @return  IPRT status code, or VERR_BUFFER_OVERFLOW if samples which not have
+ * @return  IPRT status code, or VERR_BUFFER_OVERFLOW if frames which not have
  *          been processed yet have been overwritten (due to cyclic buffer).
  * @param   pMixBuf                 Pointer to mixing buffer to write to.
  * @param   pvBuf                   Pointer to audio buffer to be written.
  * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
+ * @param   pcWritten               Returns number of audio frames written. Optional.
  */
 int AudioMixBufWriteCirc(PPDMAUDIOMIXBUF pMixBuf,
@@ -1899,5 +1898,5 @@
 
 /**
- * Writes audio samples of a specific format.
+ * Writes audio frames of a specific format.
  * This function might write less data at once than requested.
  *
@@ -1907,5 +1906,5 @@
  * @param   pvBuf                   Pointer to audio buffer to be written.
  * @param   cbBuf                   Size (in bytes) of audio buffer.
- * @param   pcWritten               Returns number of audio samples written. Optional.
+ * @param   pcWritten               Returns number of audio frames written. Optional.
  */
 int AudioMixBufWriteCircEx(PPDMAUDIOMIXBUF pMixBuf, PDMAUDIOMIXBUFFMT enmFmt,
@@ -1923,9 +1922,9 @@
     }
 
-    /* Make sure that we at least write a full audio sample. */
-    AssertReturn(AUDIOMIXBUF_B2S(pMixBuf, cbBuf), VERR_INVALID_PARAMETER);
-
-    Assert(pMixBuf->cSamples);
-    AssertPtr(pMixBuf->pSamples);
+    /* Make sure that we at least write a full audio frame. */
+    AssertReturn(AUDIOMIXBUF_B2F(pMixBuf, cbBuf), VERR_INVALID_PARAMETER);
+
+    Assert(pMixBuf->cFrames);
+    AssertPtr(pMixBuf->pFrames);
 
     PFNPDMAUDIOMIXBUFCONVFROM pfnConvFrom = NULL;
@@ -1950,11 +1949,11 @@
     uint32_t cWritten = 0;
 
-    uint32_t cFree = pMixBuf->cSamples - pMixBuf->cUsed;
+    uint32_t cFree = pMixBuf->cFrames - pMixBuf->cUsed;
     if (cFree)
     {
-        if ((pMixBuf->cSamples - pMixBuf->offWrite) == 0)
+        if ((pMixBuf->cFrames - pMixBuf->offWrite) == 0)
             pMixBuf->offWrite = 0;
 
-        uint32_t cToWrite = RT_MIN(AUDIOMIXBUF_B2S(pMixBuf, cbBuf), RT_MIN(pMixBuf->cSamples - pMixBuf->offWrite, cFree));
+        uint32_t cToWrite = RT_MIN(AUDIOMIXBUF_B2F(pMixBuf, cbBuf), RT_MIN(pMixBuf->cFrames - pMixBuf->offWrite, cFree));
         Assert(cToWrite);
 
@@ -1966,8 +1965,8 @@
         convOpts.From.Volume.uRight = pMixBuf->Volume.uRight;
 
-        convOpts.cSamples = cToWrite;
-
-        cWritten = pfnConvFrom(pMixBuf->pSamples + pMixBuf->offWrite,
-                               pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cToWrite), &convOpts);
+        convOpts.cFrames = cToWrite;
+
+        cWritten = pfnConvFrom(pMixBuf->pFrames + pMixBuf->offWrite,
+                               pvBuf, AUDIOMIXBUF_F2B(pMixBuf, cToWrite), &convOpts);
         Assert(cWritten == cToWrite);
 
@@ -1976,12 +1975,12 @@
         RTFileOpen(&fh, AUDIOMIXBUF_DEBUG_DUMP_PCM_DATA_PATH "mixbuf_writecirc_ex.pcm",
                    RTFILE_O_OPEN_CREATE | RTFILE_O_APPEND | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
-        RTFileWrite(fh, pvBuf, AUDIOMIXBUF_S2B(pMixBuf, cToWrite), NULL);
+        RTFileWrite(fh, pvBuf, AUDIOMIXBUF_F2B(pMixBuf, cToWrite), NULL);
         RTFileClose(fh);
 #endif
         pMixBuf->cUsed   += cWritten;
-        Assert(pMixBuf->cUsed <= pMixBuf->cSamples);
-
-        pMixBuf->offWrite = (pMixBuf->offWrite + cWritten) % pMixBuf->cSamples;
-        Assert(pMixBuf->offWrite <= pMixBuf->cSamples);
+        Assert(pMixBuf->cUsed <= pMixBuf->cFrames);
+
+        pMixBuf->offWrite = (pMixBuf->offWrite + cWritten) % pMixBuf->cFrames;
+        Assert(pMixBuf->offWrite <= pMixBuf->cFrames);
     }
     else
@@ -1996,6 +1995,6 @@
         *pcWritten = cWritten;
 
-    AUDMIXBUF_LOG(("%s: enmFmt=0x%x, cbBuf=%RU32 (%RU32 samples), cWritten=%RU32, rc=%Rrc\n",
-                   pMixBuf->pszName, enmFmt, cbBuf, AUDIOMIXBUF_B2S(pMixBuf, cbBuf), cWritten, rc));
+    AUDMIXBUF_LOG(("%s: enmFmt=0x%x, cbBuf=%RU32 (%RU32 frames), cWritten=%RU32, rc=%Rrc\n",
+                   pMixBuf->pszName, enmFmt, cbBuf, AUDIOMIXBUF_B2F(pMixBuf, cbBuf), cWritten, rc));
     return rc;
 }
Index: /trunk/src/VBox/Devices/Audio/AudioMixBuffer.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioMixBuffer.h	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/AudioMixBuffer.h	(revision 68132)
@@ -37,14 +37,14 @@
 #define AUDMIXBUF_FMT_BYTES_PER_SAMPLE(a) ((AUDMIXBUF_AUDIO_FMT_BITS_PER_SAMPLE(a) + 7) / 8)
 
-/** Converts samples to bytes. */
-#define AUDIOMIXBUF_S2B(pBuf, samples) ((samples) << (pBuf)->cShift)
-/** Converts samples to bytes, respecting the conversion ratio to
+/** Converts frames to bytes. */
+#define AUDIOMIXBUF_F2B(pBuf, frames) ((frames) << (pBuf)->cShift)
+/** Converts frames to bytes, respecting the conversion ratio to
  *  a linked buffer. */
-#define AUDIOMIXBUF_S2B_RATIO(pBuf, samples) ((((int64_t) samples << 32) / (pBuf)->iFreqRatio) << (pBuf)->cShift)
-/** Converts bytes to samples, *not* taking the conversion ratio
+#define AUDIOMIXBUF_F2B_RATIO(pBuf, frames) ((((int64_t) frames << 32) / (pBuf)->iFreqRatio) << (pBuf)->cShift)
+/** Converts bytes to frames, *not* taking the conversion ratio
  *  into account. */
-#define AUDIOMIXBUF_B2S(pBuf, cb)  (cb >> (pBuf)->cShift)
-/** Converts number of samples according to the buffer's ratio. */
-#define AUDIOMIXBUF_S2S_RATIO(pBuf, samples)  (((int64_t) samples << 32) / (pBuf)->iFreqRatio)
+#define AUDIOMIXBUF_B2F(pBuf, cb)  (cb >> (pBuf)->cShift)
+/** Converts number of frames according to the buffer's ratio. */
+#define AUDIOMIXBUF_F2F_RATIO(pBuf, frames)  (((int64_t) frames << 32) / (pBuf)->iFreqRatio)
 
 
@@ -52,15 +52,15 @@
 void AudioMixBufClear(PPDMAUDIOMIXBUF pMixBuf);
 void AudioMixBufDestroy(PPDMAUDIOMIXBUF pMixBuf);
-void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToClear);
+void AudioMixBufFinish(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFramesToClear);
 uint32_t AudioMixBufFree(PPDMAUDIOMIXBUF pMixBuf);
 uint32_t AudioMixBufFreeBytes(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cSamples);
+int AudioMixBufInit(PPDMAUDIOMIXBUF pMixBuf, const char *pszName, PPDMAUDIOPCMPROPS pProps, uint32_t cFrames);
 bool AudioMixBufIsEmpty(PPDMAUDIOMIXBUF pMixBuf);
 int AudioMixBufLinkTo(PPDMAUDIOMIXBUF pMixBuf, PPDMAUDIOMIXBUF pParent);
 uint32_t AudioMixBufLive(PPDMAUDIOMIXBUF pMixBuf);
-int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcSamples, uint32_t *pcSrcMixed);
-int AudioMixBufMixToParentEx(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcOffset, uint32_t cSrcSamples, uint32_t *pcSrcMixed);
-int AudioMixBufPeek(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead, PPDMAUDIOSAMPLE paSampleBuf, uint32_t cSampleBuf, uint32_t *pcSamplesRead);
-int AudioMixBufPeekMutable(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSamplesToRead, PPDMAUDIOSAMPLE *ppvSamples, uint32_t *pcSamplesRead);
+int AudioMixBufMixToParent(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcFrames, uint32_t *pcSrcMixed);
+int AudioMixBufMixToParentEx(PPDMAUDIOMIXBUF pMixBuf, uint32_t cSrcOffset, uint32_t cSrcFrames, uint32_t *pcSrcMixed);
+int AudioMixBufPeek(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFramesToRead, PPDMAUDIOFRAME paSampleBuf, uint32_t cSampleBuf, uint32_t *pcFramesRead);
+int AudioMixBufPeekMutable(PPDMAUDIOMIXBUF pMixBuf, uint32_t cFramesToRead, PPDMAUDIOFRAME *ppvSamples, uint32_t *pcFramesRead);
 uint32_t AudioMixBufUsed(PPDMAUDIOMIXBUF pMixBuf);
 int AudioMixBufReadAt(PPDMAUDIOMIXBUF pMixBuf, uint32_t offSamples, void *pvBuf, uint32_t cbBuf, uint32_t *pcbRead);
Index: /trunk/src/VBox/Devices/Audio/AudioMixer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/AudioMixer.cpp	(revision 68132)
@@ -1440,5 +1440,5 @@
         AssertPtr(pConn);
 
-        uint32_t csProc = 0;
+        uint32_t cfProc = 0;
 
         int rc2 = pConn->pfnStreamIterate(pConn, pStream);
@@ -1447,5 +1447,5 @@
             if (pSink->enmDir == AUDMIXSINKDIR_INPUT)
             {
-                rc = pConn->pfnStreamCapture(pConn, pStream, &csProc);
+                rc = pConn->pfnStreamCapture(pConn, pStream, &cfProc);
                 if (RT_FAILURE(rc2))
                 {
@@ -1456,10 +1456,10 @@
                 }
 
-                if (csProc)
+                if (cfProc)
                     pSink->fStatus |= AUDMIXSINK_STS_DIRTY;
             }
             else if (pSink->enmDir == AUDMIXSINKDIR_OUTPUT)
             {
-                rc2 = pConn->pfnStreamPlay(pConn, pStream, &csProc);
+                rc2 = pConn->pfnStreamPlay(pConn, pStream, &cfProc);
                 if (RT_FAILURE(rc2))
                 {
@@ -1495,5 +1495,5 @@
         }
 
-        Log3Func(("\t%s: cPlayed/cCaptured=%RU32, rc2=%Rrc\n", pStream->szName, csProc, rc2));
+        Log3Func(("\t%s: cPlayed/cCaptured=%RU32, rc2=%Rrc\n", pStream->szName, cfProc, rc2));
     }
 
Index: /trunk/src/VBox/Devices/Audio/DevHDA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DevHDA.cpp	(revision 68132)
@@ -2690,7 +2690,7 @@
         RTListForEach(&pThis->lstDrv, pDrv, HDADRIVER, Node)
         {
-            uint32_t cSamplesPlayed;
-            int rc2 = pDrv->pConnector->pfnPlay(pDrv->pConnector, &cSamplesPlayed);
-            LogFlowFunc(("LUN#%RU8: cSamplesPlayed=%RU32, rc=%Rrc\n", pDrv->uLUN, cSamplesPlayed, rc2));
+            uint32_t cFramesPlayed;
+            int rc2 = pDrv->pConnector->pfnPlay(pDrv->pConnector, &cFramesPlayed);
+            LogFlowFunc(("LUN#%RU8: cFramesPlayed=%RU32, rc=%Rrc\n", pDrv->uLUN, cFramesPlayed, rc2));
         }
     }
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 68132)
@@ -645,8 +645,8 @@
 #endif
 
-    /* No sample buffer size hint given by the backend? Default to some sane value. */
-    if (!CfgHostAcq.cSampleBufferHint)
-    {
-        CfgHostAcq.cSampleBufferHint = _1K; /** @todo Make this configurable? */
+    /* No frame buffer size hint given by the backend? Default to some sane value. */
+    if (!CfgHostAcq.cFrameBufferHint)
+    {
+        CfgHostAcq.cFrameBufferHint = _1K; /** @todo Make this configurable? */
     }
 
@@ -658,10 +658,10 @@
 
     /* Set set host buffer size multiplicator. */
-    const unsigned cSampleBufferHostFactor = 2; /** @todo Make this configurable. */
-
-    LogFunc(("[%s] cSamples=%RU32 (x %u)\n", pHstStream->szName, CfgHostAcq.cSampleBufferHint, cSampleBufferHostFactor));
+    const unsigned cFrameBufferHostFactor = 2; /** @todo Make this configurable. */
+
+    LogFunc(("[%s] cFrames=%RU32 (x %u)\n", pHstStream->szName, CfgHostAcq.cFrameBufferHint, cFrameBufferHostFactor));
 
     int rc2 = AudioMixBufInit(&pHstStream->MixBuf, pHstStream->szName, &CfgHostAcq.Props,
-                              CfgHostAcq.cSampleBufferHint * cSampleBufferHostFactor);
+                              CfgHostAcq.cFrameBufferHint * cFrameBufferHostFactor);
     AssertRC(rc2);
 
@@ -684,10 +684,10 @@
 
     /* Set set guest buffer size multiplicator. */
-    const unsigned cSampleBufferGuestFactor = 10; /** @todo Make this configurable. */
-
-    LogFunc(("[%s] cSamples=%RU32 (x %u)\n", pGstStream->szName, CfgHostAcq.cSampleBufferHint, cSampleBufferGuestFactor));
+    const unsigned cFrameBufferGuestFactor = 10; /** @todo Make this configurable. */
+
+    LogFunc(("[%s] cFrames=%RU32 (x %u)\n", pGstStream->szName, CfgHostAcq.cFrameBufferHint, cFrameBufferGuestFactor));
 
     rc2 = AudioMixBufInit(&pGstStream->MixBuf, pGstStream->szName, &pCfgGuest->Props,
-                          CfgHostAcq.cSampleBufferHint * cSampleBufferGuestFactor);
+                          CfgHostAcq.cFrameBufferHint * cFrameBufferGuestFactor);
     AssertRC(rc2);
 
@@ -834,5 +834,5 @@
                 STAM_COUNTER_RESET(&pHstStream->In.StatBytesElapsed);
                 STAM_COUNTER_RESET(&pHstStream->In.StatBytesTotalRead);
-                STAM_COUNTER_RESET(&pHstStream->In.StatSamplesCaptured);
+                STAM_COUNTER_RESET(&pHstStream->In.StatFramesCaptured);
 
                 if (pGstStream)
@@ -842,5 +842,5 @@
                     STAM_COUNTER_RESET(&pGstStream->In.StatBytesElapsed);
                     STAM_COUNTER_RESET(&pGstStream->In.StatBytesTotalRead);
-                    STAM_COUNTER_RESET(&pGstStream->In.StatSamplesCaptured);
+                    STAM_COUNTER_RESET(&pGstStream->In.StatFramesCaptured);
                 }
             }
@@ -849,5 +849,5 @@
                 STAM_COUNTER_RESET(&pHstStream->Out.StatBytesElapsed);
                 STAM_COUNTER_RESET(&pHstStream->Out.StatBytesTotalWritten);
-                STAM_COUNTER_RESET(&pHstStream->Out.StatSamplesPlayed);
+                STAM_COUNTER_RESET(&pHstStream->Out.StatFramesPlayed);
 
                 if (pGstStream)
@@ -857,5 +857,5 @@
                     STAM_COUNTER_RESET(&pGstStream->Out.StatBytesElapsed);
                     STAM_COUNTER_RESET(&pGstStream->Out.StatBytesTotalWritten);
-                    STAM_COUNTER_RESET(&pGstStream->Out.StatSamplesPlayed);
+                    STAM_COUNTER_RESET(&pGstStream->Out.StatFramesPlayed);
                 }
             }
@@ -953,11 +953,11 @@
         /* We use the guest side mixing buffer as an intermediate buffer to do some
          * (first) processing (if needed), so always write the incoming data at offset 0. */
-        uint32_t csWritten = 0;
-        rc = AudioMixBufWriteAt(&pGstStream->MixBuf, 0 /* offSamples */, pvBuf, cbBuf, &csWritten);
+        uint32_t cfWritten = 0;
+        rc = AudioMixBufWriteAt(&pGstStream->MixBuf, 0 /* offFrames */, pvBuf, cbBuf, &cfWritten);
         if (   RT_FAILURE(rc)
-            || !csWritten)
-        {
-            AssertMsgFailed(("[%s] Write failed: cbBuf=%RU32, csWritten=%RU32, rc=%Rrc\n",
-                             pGstStream->szName, cbBuf, csWritten, rc));
+            || !cfWritten)
+        {
+            AssertMsgFailed(("[%s] Write failed: cbBuf=%RU32, cfWritten=%RU32, rc=%Rrc\n",
+                             pGstStream->szName, cbBuf, cfWritten, rc));
             break;
         }
@@ -968,18 +968,18 @@
 
 #ifdef VBOX_WITH_STATISTICS
-        STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesWritten, csWritten);
-#endif
-        uint32_t csMixed = 0;
-        if (csWritten)
-        {
-            int rc2 = AudioMixBufMixToParentEx(&pGstStream->MixBuf, 0 /* Offset */, csWritten /* Samples */, &csMixed);
+        STAM_COUNTER_ADD(&pThis->Stats.TotalFramesWritten, cfWritten);
+#endif
+        uint32_t cfMixed = 0;
+        if (cfWritten)
+        {
+            int rc2 = AudioMixBufMixToParentEx(&pGstStream->MixBuf, 0 /* Offset */, cfWritten /* Frames */, &cfMixed);
             if (   RT_FAILURE(rc2)
-                || csMixed < csWritten)
+                || cfMixed < cfWritten)
             {
-                AssertMsgFailed(("[%s] Mixing failed: cbBuf=%RU32, csWritten=%RU32, csMixed=%RU32, rc=%Rrc\n",
-                                 pGstStream->szName, cbBuf, csWritten, csMixed, rc2));
-
-                LogRel2(("Audio: Lost audio samples (%RU32) due to full host stream '%s', expect stuttering audio output\n",
-                         csWritten - csMixed, pHstStream->szName));
+                AssertMsgFailed(("[%s] Mixing failed: cbBuf=%RU32, cfWritten=%RU32, cfMixed=%RU32, rc=%Rrc\n",
+                                 pGstStream->szName, cbBuf, cfWritten, cfMixed, rc2));
+
+                LogRel2(("Audio: Lost audio frames (%RU32) due to full host stream '%s', expect stuttering audio output\n",
+                         cfWritten - cfMixed, pHstStream->szName));
 
                 /* Keep going. */
@@ -989,10 +989,10 @@
                 rc = rc2;
 
-            cbWritten = AUDIOMIXBUF_S2B(&pGstStream->MixBuf, csWritten);
+            cbWritten = AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cfWritten);
 
 #ifdef VBOX_WITH_STATISTICS
-            STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesMixedOut,     csMixed);
-            Assert(csWritten >= csMixed);
-            STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesLostOut,      csWritten - csMixed);
+            STAM_COUNTER_ADD(&pThis->Stats.TotalFramesMixedOut,      cfMixed);
+            Assert(cfWritten >= cfMixed);
+            STAM_COUNTER_ADD(&pThis->Stats.TotalFramesLostOut,       cfWritten - cfMixed);
             STAM_COUNTER_ADD(&pThis->Stats.TotalBytesWritten,        cbWritten);
             STAM_COUNTER_ADD(&pGstStream->Out.StatBytesTotalWritten, cbWritten);
@@ -1002,5 +1002,5 @@
         Log3Func(("[%s] cbBuf=%RU32, cUsed=%RU32, cLive=%RU32, cWritten=%RU32, cMixed=%RU32, rc=%Rrc\n",
                   pGstStream->szName,
-                  cbBuf, AudioMixBufUsed(&pGstStream->MixBuf), AudioMixBufLive(&pGstStream->MixBuf), csWritten, csMixed, rc));
+                  cbBuf, AudioMixBufUsed(&pGstStream->MixBuf), AudioMixBufLive(&pGstStream->MixBuf), cfWritten, cfMixed, rc));
 
     } while (0);
@@ -1143,5 +1143,5 @@
     do
     {
-        uint32_t csMixed = 0;
+        uint32_t cfMixed = 0;
 
         rc = pThis->pHostDrvAudio->pfnStreamIterate(pThis->pHostDrvAudio, pHstStream->pvBackend);
@@ -1151,11 +1151,11 @@
         if (pHstStream->enmDir == PDMAUDIODIR_IN)
         {
-            /* Has the host captured any samples which were not mixed to the guest side yet? */
-            uint32_t csCaptured = AudioMixBufUsed(&pHstStream->MixBuf);
-            if (csCaptured)
+            /* Has the host captured any frames which were not mixed to the guest side yet? */
+            uint32_t cfCaptured = AudioMixBufUsed(&pHstStream->MixBuf);
+            if (cfCaptured)
             {
-                /* When capturing samples, the guest is the parent while the host is the child.
-                 * So try mixing not yet mixed host-side samples to the guest-side buffer. */
-                rc = AudioMixBufMixToParent(&pHstStream->MixBuf, csCaptured, &csMixed);
+                /* When capturing frames, the guest is the parent while the host is the child.
+                 * So try mixing not yet mixed host-side frames to the guest-side buffer. */
+                rc = AudioMixBufMixToParent(&pHstStream->MixBuf, cfCaptured, &cfMixed);
                 if (RT_FAILURE(rc))
                 {
@@ -1170,9 +1170,9 @@
 
 #ifdef VBOX_WITH_STATISTICS
-                STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesMixedIn, csMixed);
-                Assert(csCaptured >= csMixed);
-                STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesLostIn,  csCaptured - csMixed);
-#endif
-                Log3Func(("[%s] %RU32/%RU32 input samples mixed, rc=%Rrc\n", pHstStream->szName, csMixed, csCaptured, rc));
+                STAM_COUNTER_ADD(&pThis->Stats.TotalFramesMixedIn, cfMixed);
+                Assert(cfCaptured >= cfMixed);
+                STAM_COUNTER_ADD(&pThis->Stats.TotalFramesLostIn,  cfCaptured - cfMixed);
+#endif
+                Log3Func(("[%s] %RU32/%RU32 input frames mixed, rc=%Rrc\n", pHstStream->szName, cfMixed, cfCaptured, rc));
             }
             else
@@ -1257,13 +1257,13 @@
  * @param   pThis               Pointer to driver instance.
  * @param   pHstStream          Host stream to play.
- * @param   csToPlay            Number of audio samples to play.
- * @param   pcsPlayed           Returns number of audio samples played. Optional.
+ * @param   cfToPlay            Number of audio frames to play.
+ * @param   pcfPlayed           Returns number of audio frames played. Optional.
  */
 static int drvAudioStreamPlayNonInterleaved(PDRVAUDIO pThis,
-                                            PPDMAUDIOSTREAM pHstStream, uint32_t csToPlay, uint32_t *pcsPlayed)
+                                            PPDMAUDIOSTREAM pHstStream, uint32_t cfToPlay, uint32_t *pcfPlayed)
 {
     AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
     AssertPtrReturn(pHstStream, VERR_INVALID_POINTER);
-    /* pcsPlayed is optional. */
+    /* pcfPlayed is optional. */
 
     /* Sanity. */
@@ -1272,8 +1272,8 @@
     Assert(pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED);
 
-    if (!csToPlay)
-    {
-        if (pcsPlayed)
-            *pcsPlayed = 0;
+    if (!cfToPlay)
+    {
+        if (pcfPlayed)
+            *pcfPlayed = 0;
         return VINF_SUCCESS;
     }
@@ -1281,5 +1281,5 @@
     int rc = VINF_SUCCESS;
 
-    uint32_t csPlayedTotal = 0;
+    uint32_t cfPlayedTotal = 0;
 
     AssertPtr(pThis->pHostDrvAudio->pfnStreamGetWritable);
@@ -1287,19 +1287,19 @@
     if (cbWritable)
     {
-        if (csToPlay > AUDIOMIXBUF_B2S(&pHstStream->MixBuf, cbWritable)) /* More samples available than we can write? Limit. */
-            csToPlay = AUDIOMIXBUF_B2S(&pHstStream->MixBuf, cbWritable);
-
-        if (csToPlay)
+        if (cfToPlay > AUDIOMIXBUF_B2F(&pHstStream->MixBuf, cbWritable)) /* More frames available than we can write? Limit. */
+            cfToPlay = AUDIOMIXBUF_B2F(&pHstStream->MixBuf, cbWritable);
+
+        if (cfToPlay)
         {
             uint8_t auBuf[256]; /** @todo Get rid of this here. */
 
-            uint32_t cbLeft  = AUDIOMIXBUF_S2B(&pHstStream->MixBuf, csToPlay);
+            uint32_t cbLeft  = AUDIOMIXBUF_F2B(&pHstStream->MixBuf, cfToPlay);
             uint32_t cbChunk = sizeof(auBuf);
 
             while (cbLeft)
             {
-                uint32_t csRead = 0;
-                rc = AudioMixBufReadCirc(&pHstStream->MixBuf, auBuf, RT_MIN(cbChunk, cbLeft), &csRead);
-                if (   !csRead
+                uint32_t cfRead = 0;
+                rc = AudioMixBufReadCirc(&pHstStream->MixBuf, auBuf, RT_MIN(cbChunk, cbLeft), &cfRead);
+                if (   !cfRead
                     || RT_FAILURE(rc))
                 {
@@ -1307,5 +1307,5 @@
                 }
 
-                uint32_t cbRead = AUDIOMIXBUF_S2B(&pHstStream->MixBuf, csRead);
+                uint32_t cbRead = AUDIOMIXBUF_F2B(&pHstStream->MixBuf, cfRead);
                 Assert(cbRead <= cbChunk);
 
@@ -1326,8 +1326,8 @@
 #if 0 /** @todo Also handle mono channels. Needs fixing */
                 AssertMsg(cbPlayed % 2 == 0,
-                          ("Backend for stream '%s' returned uneven played bytes count (csRead=%RU32, cbPlayed=%RU32)\n",
-                           pHstStream->szName, csRead, cbPlayed));*/
-#endif
-                csPlayedTotal += AUDIOMIXBUF_B2S(&pHstStream->MixBuf, cbPlayed);
+                          ("Backend for stream '%s' returned uneven played bytes count (cfRead=%RU32, cbPlayed=%RU32)\n",
+                           pHstStream->szName, cfRead, cbPlayed));*/
+#endif
+                cfPlayedTotal += AUDIOMIXBUF_B2F(&pHstStream->MixBuf, cbPlayed);
                 Assert(cbLeft >= cbPlayed);
                 cbLeft        -= cbPlayed;
@@ -1336,10 +1336,10 @@
     }
 
-    Log3Func(("[%s] Played %RU32/%RU32 samples, rc=%Rrc\n", pHstStream->szName, csPlayedTotal, csToPlay, rc));
+    Log3Func(("[%s] Played %RU32/%RU32 frames, rc=%Rrc\n", pHstStream->szName, cfPlayedTotal, cfToPlay, rc));
 
     if (RT_SUCCESS(rc))
     {
-        if (pcsPlayed)
-            *pcsPlayed = csPlayedTotal;
+        if (pcfPlayed)
+            *pcfPlayed = cfPlayedTotal;
     }
 
@@ -1353,13 +1353,13 @@
  * @param   pThis               Pointer to driver instance.
  * @param   pHstStream          Host stream to play.
- * @param   csToPlay            Number of audio samples to play.
- * @param   pcsPlayed           Returns number of audio samples played. Optional.
+ * @param   cfToPlay            Number of audio frames to play.
+ * @param   pcfPlayed           Returns number of audio frames played. Optional.
  */
 static int drvAudioStreamPlayRaw(PDRVAUDIO pThis,
-                                 PPDMAUDIOSTREAM pHstStream, uint32_t csToPlay, uint32_t *pcsPlayed)
+                                 PPDMAUDIOSTREAM pHstStream, uint32_t cfToPlay, uint32_t *pcfPlayed)
 {
     AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
     AssertPtrReturn(pHstStream, VERR_INVALID_POINTER);
-    /* pcsPlayed is optional. */
+    /* pcfPlayed is optional. */
 
     /* Sanity. */
@@ -1368,8 +1368,8 @@
     Assert(pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_RAW);
 
-    if (!csToPlay)
-    {
-        if (pcsPlayed)
-            *pcsPlayed = 0;
+    if (!cfToPlay)
+    {
+        if (pcfPlayed)
+            *pcfPlayed = 0;
         return VINF_SUCCESS;
     }
@@ -1377,44 +1377,44 @@
     int rc = VINF_SUCCESS;
 
-    uint32_t csPlayedTotal = 0;
+    uint32_t cfPlayedTotal = 0;
 
     AssertPtr(pThis->pHostDrvAudio->pfnStreamGetWritable);
-    uint32_t csWritable = pThis->pHostDrvAudio->pfnStreamGetWritable(pThis->pHostDrvAudio, pHstStream->pvBackend);
-    if (csWritable)
-    {
-        if (csToPlay > csWritable) /* More samples available than we can write? Limit. */
-            csToPlay = csWritable;
-
-        PDMAUDIOSAMPLE aSampleBuf[256]; /** @todo Get rid of this here. */
-
-        uint32_t csLeft = csToPlay;
-        while (csLeft)
-        {
-            uint32_t csRead = 0;
-            rc = AudioMixBufPeek(&pHstStream->MixBuf, csLeft, aSampleBuf,
-                                 RT_MIN(csLeft, RT_ELEMENTS(aSampleBuf)), &csRead);
+    uint32_t cfWritable = pThis->pHostDrvAudio->pfnStreamGetWritable(pThis->pHostDrvAudio, pHstStream->pvBackend);
+    if (cfWritable)
+    {
+        if (cfToPlay > cfWritable) /* More frames available than we can write? Limit. */
+            cfToPlay = cfWritable;
+
+        PDMAUDIOFRAME aFrameBuf[256]; /** @todo Get rid of this here. */
+
+        uint32_t cfLeft = cfToPlay;
+        while (cfLeft)
+        {
+            uint32_t cfRead = 0;
+            rc = AudioMixBufPeek(&pHstStream->MixBuf, cfLeft, aFrameBuf,
+                                 RT_MIN(cfLeft, RT_ELEMENTS(aFrameBuf)), &cfRead);
 
             if (RT_SUCCESS(rc))
             {
-                if (csRead)
+                if (cfRead)
                 {
-                    uint32_t csPlayed;
+                    uint32_t cfPlayed;
 
                     /* Note: As the stream layout is RPDMAUDIOSTREAMLAYOUT_RAW, operate on audio frames
                      *       rather on bytes. */
-                    Assert(csRead <= RT_ELEMENTS(aSampleBuf));
+                    Assert(cfRead <= RT_ELEMENTS(aFrameBuf));
                     rc = pThis->pHostDrvAudio->pfnStreamPlay(pThis->pHostDrvAudio, pHstStream->pvBackend,
-                                                             aSampleBuf, csRead, &csPlayed);
+                                                             aFrameBuf, cfRead, &cfPlayed);
                     if (   RT_FAILURE(rc)
-                        || !csPlayed)
+                        || !cfPlayed)
                     {
                         break;
                     }
 
-                    csPlayedTotal += csPlayed;
-                    Assert(csPlayedTotal <= csToPlay);
-
-                    Assert(csLeft >= csRead);
-                    csLeft        -= csRead;
+                    cfPlayedTotal += cfPlayed;
+                    Assert(cfPlayedTotal <= cfToPlay);
+
+                    Assert(cfLeft >= cfRead);
+                    cfLeft        -= cfRead;
                 }
                 else
@@ -1431,10 +1431,10 @@
     }
 
-    Log3Func(("[%s] Played %RU32/%RU32 samples, rc=%Rrc\n", pHstStream->szName, csPlayedTotal, csToPlay, rc));
+    Log3Func(("[%s] Played %RU32/%RU32 frames, rc=%Rrc\n", pHstStream->szName, cfPlayedTotal, cfToPlay, rc));
 
     if (RT_SUCCESS(rc))
     {
-        if (pcsPlayed)
-            *pcsPlayed = csPlayedTotal;
+        if (pcfPlayed)
+            *pcfPlayed = cfPlayedTotal;
 
     }
@@ -1447,9 +1447,9 @@
  */
 static DECLCALLBACK(int) drvAudioStreamPlay(PPDMIAUDIOCONNECTOR pInterface,
-                                            PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesPlayed)
+                                            PPDMAUDIOSTREAM pStream, uint32_t *pcFramesPlayed)
 {
     AssertPtrReturn(pInterface, VERR_INVALID_POINTER);
     AssertPtrReturn(pStream,    VERR_INVALID_POINTER);
-    /* pcSamplesPlayed is optional. */
+    /* pcFramesPlayed is optional. */
 
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
@@ -1463,5 +1463,5 @@
                pStream->szName, pStream->enmDir));
 
-    uint32_t csPlayedTotal = 0;
+    uint32_t cfPlayedTotal = 0;
 
     do
@@ -1501,5 +1501,5 @@
             break;
 
-        uint32_t csToPlay = AudioMixBufLive(&pHstStream->MixBuf);
+        uint32_t cfToPlay = AudioMixBufLive(&pHstStream->MixBuf);
 
         if (pThis->pHostDrvAudio->pfnStreamPlayBegin)
@@ -1508,9 +1508,9 @@
         if (RT_LIKELY(pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED))
         {
-            rc = drvAudioStreamPlayNonInterleaved(pThis, pHstStream, csToPlay, &csPlayedTotal);
+            rc = drvAudioStreamPlayNonInterleaved(pThis, pHstStream, cfToPlay, &cfPlayedTotal);
         }
         else if (pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_RAW)
         {
-            rc = drvAudioStreamPlayRaw(pThis, pHstStream, csToPlay, &csPlayedTotal);
+            rc = drvAudioStreamPlayRaw(pThis, pHstStream, cfToPlay, &cfPlayedTotal);
         }
         else
@@ -1520,26 +1520,26 @@
             pThis->pHostDrvAudio->pfnStreamPlayEnd(pThis->pHostDrvAudio, pHstStream->pvBackend);
 
-        uint32_t csLive = 0;
+        uint32_t cfLive = 0;
 
         if (RT_SUCCESS(rc))
         {
-            AudioMixBufFinish(&pHstStream->MixBuf, csPlayedTotal);
+            AudioMixBufFinish(&pHstStream->MixBuf, cfPlayedTotal);
 
 #ifdef VBOX_WITH_STATISTICS
-            STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesOut, csPlayedTotal);
+            STAM_COUNTER_ADD     (&pThis->Stats.TotalFramesOut, cfPlayedTotal);
             STAM_PROFILE_ADV_STOP(&pThis->Stats.DelayOut, out);
-            STAM_COUNTER_ADD(&pHstStream->Out.StatSamplesPlayed, csPlayedTotal);
-#endif
-            csLive = AudioMixBufLive(&pHstStream->MixBuf);
+            STAM_COUNTER_ADD     (&pHstStream->Out.StatFramesPlayed, cfPlayedTotal);
+#endif
+            cfLive = AudioMixBufLive(&pHstStream->MixBuf);
         }
 
 #ifdef LOG_ENABLED
         pszBackendSts = dbgAudioStreamStatusToStr(stsBackend);
-        Log3Func(("[%s] End: stsBackend=%s, csLive=%RU32, csPlayedTotal=%RU32, rc=%Rrc\n",
-                  pHstStream->szName, pszBackendSts, csLive, csPlayedTotal, rc));
+        Log3Func(("[%s] End: stsBackend=%s, cfLive=%RU32, cfPlayedTotal=%RU32, rc=%Rrc\n",
+                  pHstStream->szName, pszBackendSts, cfLive, cfPlayedTotal, rc));
         RTStrFree(pszBackendSts);
 #endif /* LOG_ENABLED */
 
-        if (!csLive)
+        if (!cfLive)
         {
             /* Has the host stream marked as disabled but there still were guest streams relying
@@ -1566,6 +1566,6 @@
     if (RT_SUCCESS(rc))
     {
-        if (pcSamplesPlayed)
-            *pcSamplesPlayed = csPlayedTotal;
+        if (pcFramesPlayed)
+            *pcFramesPlayed = cfPlayedTotal;
     }
 
@@ -1582,11 +1582,11 @@
  * @param   pThis               Driver instance.
  * @param   pHstStream          Host stream to capture from.
- * @param   pcsCaptured         Number of (host) audio samples captured. Optional.
- */
-static int drvAudioStreamCaptureNonInterleaved(PDRVAUDIO pThis, PPDMAUDIOSTREAM pHstStream, uint32_t *pcsCaptured)
+ * @param   pcfCaptured         Number of (host) audio frames captured. Optional.
+ */
+static int drvAudioStreamCaptureNonInterleaved(PDRVAUDIO pThis, PPDMAUDIOSTREAM pHstStream, uint32_t *pcfCaptured)
 {
     AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
     AssertPtrReturn(pHstStream, VERR_INVALID_POINTER);
-    /* pcsCaptured is optional. */
+    /* pcfCaptured is optional. */
 
     /* Sanity. */
@@ -1597,5 +1597,5 @@
     int rc = VINF_SUCCESS;
 
-    uint32_t csCapturedTotal = 0;
+    uint32_t cfCapturedTotal = 0;
 
     AssertPtr(pThis->pHostDrvAudio->pfnStreamGetReadable);
@@ -1610,5 +1610,5 @@
             break;
 
-        uint32_t cbFree = AUDIOMIXBUF_S2B(&pHstStream->MixBuf, AudioMixBufFree(&pHstStream->MixBuf));
+        uint32_t cbFree = AUDIOMIXBUF_F2B(&pHstStream->MixBuf, AudioMixBufFree(&pHstStream->MixBuf));
         if (!cbFree)
             break;
@@ -1640,8 +1640,8 @@
                 cbCaptured = (uint32_t)cbBuf;
 
-            uint32_t csCaptured = 0;
-            rc = AudioMixBufWriteCirc(&pHstStream->MixBuf, auBuf, cbCaptured, &csCaptured);
+            uint32_t cfCaptured = 0;
+            rc = AudioMixBufWriteCirc(&pHstStream->MixBuf, auBuf, cbCaptured, &cfCaptured);
             if (RT_SUCCESS(rc))
-                csCapturedTotal += csCaptured;
+                cfCapturedTotal += cfCaptured;
         }
         else /* Nothing captured -- bail out. */
@@ -1652,8 +1652,8 @@
     }
 
-    Log2Func(("[%s] %RU32 samples captured, rc=%Rrc\n", pHstStream->szName, csCapturedTotal, rc));
-
-    if (pcsCaptured)
-        *pcsCaptured = csCapturedTotal;
+    Log2Func(("[%s] %RU32 frames captured, rc=%Rrc\n", pHstStream->szName, cfCapturedTotal, rc));
+
+    if (pcfCaptured)
+        *pcfCaptured = cfCapturedTotal;
 
     return rc;
@@ -1662,5 +1662,5 @@
 /**
  * Captures raw input from a host stream.
- * Raw input means that the backend directly operates on PDMAUDIOSAMPLE structs without
+ * Raw input means that the backend directly operates on PDMAUDIOFRAME structs without
  * no data layout processing done in between.
  *
@@ -1670,11 +1670,11 @@
  * @param   pThis               Driver instance.
  * @param   pHstStream          Host stream to capture from.
- * @param   pcsCaptured         Number of (host) audio samples captured. Optional.
- */
-static int drvAudioStreamCaptureRaw(PDRVAUDIO pThis, PPDMAUDIOSTREAM pHstStream, uint32_t *pcsCaptured)
+ * @param   pcfCaptured         Number of (host) audio frames captured. Optional.
+ */
+static int drvAudioStreamCaptureRaw(PDRVAUDIO pThis, PPDMAUDIOSTREAM pHstStream, uint32_t *pcfCaptured)
 {
     AssertPtrReturn(pThis,      VERR_INVALID_POINTER);
     AssertPtrReturn(pHstStream, VERR_INVALID_POINTER);
-    /* pcsCaptured is optional. */
+    /* pcfCaptured is optional. */
 
     /* Sanity. */
@@ -1685,5 +1685,5 @@
     int rc = VINF_SUCCESS;
 
-    uint32_t csCapturedTotal = 0;
+    uint32_t cfCapturedTotal = 0;
 
     AssertPtr(pThis->pHostDrvAudio->pfnStreamGetReadable);
@@ -1702,17 +1702,17 @@
             cbReadable = cbFree;
 
-        PPDMAUDIOSAMPLE paSamples;
-        uint32_t csWritable;
-        rc = AudioMixBufPeekMutable(&pHstStream->MixBuf, AUDIOMIXBUF_B2S(&pHstStream->MixBuf, cbReadable),
-                                    &paSamples, &csWritable);
+        PPDMAUDIOFRAME paFrames;
+        uint32_t cfWritable;
+        rc = AudioMixBufPeekMutable(&pHstStream->MixBuf, AUDIOMIXBUF_B2F(&pHstStream->MixBuf, cbReadable),
+                                    &paFrames, &cfWritable);
         if (   RT_FAILURE(rc)
-            || !csWritable)
-        {
-            break;
-        }
-
-        uint32_t csCaptured;
+            || !cfWritable)
+        {
+            break;
+        }
+
+        uint32_t cfCaptured;
         rc = pThis->pHostDrvAudio->pfnStreamCapture(pThis->pHostDrvAudio, pHstStream->pvBackend,
-                                                    paSamples, csWritable, &csCaptured);
+                                                    paFrames, cfWritable, &cfCaptured);
         if (RT_FAILURE(rc))
         {
@@ -1720,11 +1720,11 @@
             AssertRC(rc2);
         }
-        else if (csCaptured)
-        {
-            Assert(csCaptured <= csWritable);
-            if (csCaptured > csWritable) /* Paranoia. */
-                csCaptured = csWritable;
-
-            csCapturedTotal += csCaptured;
+        else if (cfCaptured)
+        {
+            Assert(cfCaptured <= cfWritable);
+            if (cfCaptured > cfWritable) /* Paranoia. */
+                cfCaptured = cfWritable;
+
+            cfCapturedTotal += cfCaptured;
         }
         else /* Nothing captured -- bail out. */
@@ -1735,8 +1735,8 @@
     }
 
-    Log2Func(("[%s] %RU32 samples captured, rc=%Rrc\n", pHstStream->szName, csCapturedTotal, rc));
-
-    if (pcsCaptured)
-        *pcsCaptured = csCapturedTotal;
+    Log2Func(("[%s] %RU32 frames captured, rc=%Rrc\n", pHstStream->szName, cfCapturedTotal, rc));
+
+    if (pcfCaptured)
+        *pcfCaptured = cfCapturedTotal;
 
     return rc;
@@ -1747,5 +1747,5 @@
  */
 static DECLCALLBACK(int) drvAudioStreamCapture(PPDMIAUDIOCONNECTOR pInterface,
-                                               PPDMAUDIOSTREAM pStream, uint32_t *pcSamplesCaptured)
+                                               PPDMAUDIOSTREAM pStream, uint32_t *pcFramesCaptured)
 {
     PDRVAUDIO pThis = PDMIAUDIOCONNECTOR_2_DRVAUDIO(pInterface);
@@ -1759,5 +1759,5 @@
                pStream->szName, pStream->enmDir));
 
-    uint32_t csCaptured = 0;
+    uint32_t cfCaptured = 0;
 
     do
@@ -1800,9 +1800,9 @@
         if (RT_LIKELY(pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_NON_INTERLEAVED))
         {
-            rc = drvAudioStreamCaptureNonInterleaved(pThis, pHstStream, &csCaptured);
+            rc = drvAudioStreamCaptureNonInterleaved(pThis, pHstStream, &cfCaptured);
         }
         else if (pHstStream->Cfg.enmLayout == PDMAUDIOSTREAMLAYOUT_RAW)
         {
-            rc = drvAudioStreamCaptureRaw(pThis, pHstStream, &csCaptured);
+            rc = drvAudioStreamCaptureRaw(pThis, pHstStream, &cfCaptured);
         }
         else
@@ -1814,6 +1814,6 @@
 #ifdef LOG_ENABLED
         pszBackendSts = dbgAudioStreamStatusToStr(stsBackend);
-        Log3Func(("[%s] End: stsBackend=%s, csCaptured=%RU32, rc=%Rrc\n",
-                  pHstStream->szName, pszBackendSts, csCaptured, rc));
+        Log3Func(("[%s] End: stsBackend=%s, cfCaptured=%RU32, rc=%Rrc\n",
+                  pHstStream->szName, pszBackendSts, cfCaptured, rc));
         RTStrFree(pszBackendSts);
 #endif /* LOG_ENABLED */
@@ -1821,9 +1821,9 @@
         if (RT_SUCCESS(rc))
         {
-            Log3Func(("[%s] %RU32 samples captured, rc=%Rrc\n", pHstStream->szName, csCaptured, rc));
+            Log3Func(("[%s] %RU32 frames captured, rc=%Rrc\n", pHstStream->szName, cfCaptured, rc));
 
 #ifdef VBOX_WITH_STATISTICS
-            STAM_COUNTER_ADD(&pThis->Stats.TotalSamplesIn,        csCaptured);
-            STAM_COUNTER_ADD(&pHstStream->In.StatSamplesCaptured, csCaptured);
+            STAM_COUNTER_ADD(&pThis->Stats.TotalFramesIn,        cfCaptured);
+            STAM_COUNTER_ADD(&pHstStream->In.StatFramesCaptured, cfCaptured);
 #endif
         }
@@ -1838,6 +1838,6 @@
     } while (0);
 
-    if (pcSamplesCaptured)
-        *pcSamplesCaptured = csCaptured;
+    if (pcFramesCaptured)
+        *pcFramesCaptured = cfCaptured;
 
     int rc2 = RTCritSectLeave(&pThis->CritSect);
@@ -2365,15 +2365,15 @@
         uint32_t cReadTotal = 0;
 
-        uint32_t cToRead = RT_MIN(AUDIOMIXBUF_B2S(&pGstStream->MixBuf, cbBuf), AudioMixBufUsed(&pGstStream->MixBuf));
+        uint32_t cToRead = RT_MIN(AUDIOMIXBUF_B2F(&pGstStream->MixBuf, cbBuf), AudioMixBufUsed(&pGstStream->MixBuf));
         while (cToRead)
         {
             uint32_t cRead;
-            rc = AudioMixBufReadCirc(&pGstStream->MixBuf, (uint8_t *)pvBuf + AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadTotal),
-                                     AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cToRead), &cRead);
+            rc = AudioMixBufReadCirc(&pGstStream->MixBuf, (uint8_t *)pvBuf + AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cReadTotal),
+                                     AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cToRead), &cRead);
             if (RT_FAILURE(rc))
                 break;
 
 #if defined (VBOX_WITH_STATISTICS) || defined (VBOX_AUDIO_DEBUG_DUMP_PCM_DATA)
-            const uint32_t cbRead = AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cRead);
+            const uint32_t cbRead = AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cRead);
 #endif
 
@@ -2392,5 +2392,5 @@
 #ifdef VBOX_AUDIO_DEBUG_DUMP_PCM_DATA
             drvAudioDbgPCMDump(pThis, VBOX_AUDIO_DEBUG_DUMP_PCM_DATA_PATH, "StreamRead.pcm",
-                               pvBuf, AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadTotal));
+                               pvBuf, AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cReadTotal));
 #endif
             AudioMixBufFinish(&pGstStream->MixBuf, cReadTotal);
@@ -2398,5 +2398,5 @@
             pGstStream->In.tsLastReadMS = RTTimeMilliTS();
 
-            cbReadTotal = AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadTotal);
+            cbReadTotal = AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cReadTotal);
         }
 
@@ -2548,7 +2548,7 @@
                                       szStatName, STAMUNIT_BYTES, "Total bytes read.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesCaptured", pHstStrm->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStrm->In.StatSamplesCaptured,
-                                      szStatName, STAMUNIT_COUNT, "Total samples captured.");
+            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/FramesCaptured", pHstStrm->szName);
+            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStrm->In.StatFramesCaptured,
+                                      szStatName, STAMUNIT_COUNT, "Total frames captured.");
         }
         else if (pCfgGuest->enmDir == PDMAUDIODIR_OUT)
@@ -2562,7 +2562,7 @@
                                       szStatName, STAMUNIT_BYTES, "Total bytes written.");
 
-            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/SamplesPlayed", pHstStrm->szName);
-            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStrm->Out.StatSamplesPlayed,
-                                      szStatName, STAMUNIT_COUNT, "Total samples played.");
+            RTStrPrintf(szStatName, sizeof(szStatName), "Host/%s/FramesPlayed", pHstStrm->szName);
+            PDMDrvHlpSTAMRegCounterEx(pThis->pDrvIns, &pHstStrm->Out.StatFramesPlayed,
+                                      szStatName, STAMUNIT_COUNT, "Total frames played.");
         }
         else
@@ -2723,12 +2723,12 @@
 
     Log3Func(("[%s] cbReadable=%RU32 (%zu bytes)\n", pHstStream->szName, cReadable,
-              AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadable)));
-
-    uint32_t cbReadable = AUDIOMIXBUF_S2B(&pGstStream->MixBuf, cReadable);
+              AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cReadable)));
+
+    uint32_t cbReadable = AUDIOMIXBUF_F2B(&pGstStream->MixBuf, cReadable);
 
     rc2 = RTCritSectLeave(&pThis->CritSect);
     AssertRC(rc2);
 
-    /* Return bytes instead of audio samples. */
+    /* Return bytes instead of audio frames. */
     return cbReadable;
 }
@@ -2862,9 +2862,9 @@
                 if (pHstStream->enmDir == PDMAUDIODIR_IN)
                 {
-                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pHstStream->In.StatSamplesCaptured);
+                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pHstStream->In.StatFramesCaptured);
                 }
                 else if (pHstStream->enmDir == PDMAUDIODIR_OUT)
                 {
-                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pHstStream->Out.StatSamplesPlayed);
+                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pHstStream->Out.StatFramesPlayed);
                 }
                 else
@@ -2891,5 +2891,5 @@
                     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->In.StatBytesElapsed);
                     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->In.StatBytesTotalRead);
-                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->In.StatSamplesCaptured);
+                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->In.StatFramesCaptured);
                 }
                 else if (pGstStream->enmDir == PDMAUDIODIR_OUT)
@@ -2897,5 +2897,5 @@
                     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->Out.StatBytesElapsed);
                     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->Out.StatBytesTotalWritten);
-                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->Out.StatSamplesPlayed);
+                    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pGstStream->Out.StatFramesPlayed);
                 }
                 else
@@ -3217,20 +3217,20 @@
         PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalStreamsCreated,  "TotalStreamsCreated",
                                   STAMUNIT_COUNT, "Total created audio streams.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesRead,     "TotalSamplesRead",
-                                  STAMUNIT_COUNT, "Total samples read by device emulation.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesWritten,  "TotalSamplesWritten",
-                                  STAMUNIT_COUNT, "Total samples written by device emulation ");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesMixedIn,  "TotalSamplesMixedIn",
-                                  STAMUNIT_COUNT, "Total input samples mixed.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesMixedOut, "TotalSamplesMixedOut",
-                                  STAMUNIT_COUNT, "Total output samples mixed.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesLostIn,   "TotalSamplesLostIn",
-                                  STAMUNIT_COUNT, "Total input samples lost.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesLostOut,  "TotalSamplesLostOut",
-                                  STAMUNIT_COUNT, "Total output samples lost.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesOut,      "TotalSamplesPlayed",
-                                  STAMUNIT_COUNT, "Total samples played by backend.");
-        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalSamplesIn,       "TotalSamplesCaptured",
-                                  STAMUNIT_COUNT, "Total samples captured by backend.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesRead,      "TotalFramesRead",
+                                  STAMUNIT_COUNT, "Total frames read by device emulation.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesWritten,   "TotalFramesWritten",
+                                  STAMUNIT_COUNT, "Total frames written by device emulation ");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesMixedIn,   "TotalFramesMixedIn",
+                                  STAMUNIT_COUNT, "Total input frames mixed.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesMixedOut,  "TotalFramesMixedOut",
+                                  STAMUNIT_COUNT, "Total output frames mixed.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesLostIn,    "TotalFramesLostIn",
+                                  STAMUNIT_COUNT, "Total input frames lost.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesLostOut,   "TotalFramesLostOut",
+                                  STAMUNIT_COUNT, "Total output frames lost.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesOut,       "TotalFramesPlayed",
+                                  STAMUNIT_COUNT, "Total frames played by backend.");
+        PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalFramesIn,        "TotalFramesCaptured",
+                                  STAMUNIT_COUNT, "Total frames captured by backend.");
         PDMDrvHlpSTAMRegCounterEx(pDrvIns, &pThis->Stats.TotalBytesRead,       "TotalBytesRead",
                                   STAMUNIT_BYTES, "Total bytes read.");
@@ -3334,12 +3334,12 @@
     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalStreamsActive);
     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalStreamsCreated);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesRead);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesWritten);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesMixedIn);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesMixedOut);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesLostIn);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesLostOut);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesOut);
-    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalSamplesIn);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesRead);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesWritten);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesMixedIn);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesMixedOut);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesLostIn);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesLostOut);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesOut);
+    PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalFramesIn);
     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalBytesRead);
     PDMDrvHlpSTAMDeregister(pThis->pDrvIns, &pThis->Stats.TotalBytesWritten);
Index: /trunk/src/VBox/Devices/Audio/DrvAudio.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 68132)
@@ -94,12 +94,12 @@
     STAMCOUNTER TotalStreamsActive;
     STAMCOUNTER TotalStreamsCreated;
-    STAMCOUNTER TotalSamplesRead;
-    STAMCOUNTER TotalSamplesWritten;
-    STAMCOUNTER TotalSamplesMixedIn;
-    STAMCOUNTER TotalSamplesMixedOut;
-    STAMCOUNTER TotalSamplesLostIn;
-    STAMCOUNTER TotalSamplesLostOut;
-    STAMCOUNTER TotalSamplesOut;
-    STAMCOUNTER TotalSamplesIn;
+    STAMCOUNTER TotalFramesRead;
+    STAMCOUNTER TotalFramesWritten;
+    STAMCOUNTER TotalFramesMixedIn;
+    STAMCOUNTER TotalFramesMixedOut;
+    STAMCOUNTER TotalFramesLostIn;
+    STAMCOUNTER TotalFramesLostOut;
+    STAMCOUNTER TotalFramesOut;
+    STAMCOUNTER TotalFramesIn;
     STAMCOUNTER TotalBytesRead;
     STAMCOUNTER TotalBytesWritten;
@@ -165,5 +165,5 @@
 uint8_t DrvAudioHlpAudFmtToBits(PDMAUDIOFMT enmFmt);
 const char *DrvAudioHlpAudFmtToStr(PDMAUDIOFMT enmFmt);
-void DrvAudioHlpClearBuf(const PPDMAUDIOPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cSamples);
+void DrvAudioHlpClearBuf(const PPDMAUDIOPCMPROPS pPCMInfo, void *pvBuf, size_t cbBuf, uint32_t cFrames);
 uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
 uint32_t DrvAudioHlpCalcBitrate(const PPDMAUDIOPCMPROPS pProps);
Index: /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 68132)
@@ -1035,5 +1035,5 @@
         {
             case SND_PCM_STATE_PREPARED:
-                cAvail = PDMAUDIOSTREAMCFG_B2S(pCfg, cxBuf);
+                cAvail = PDMAUDIOSTREAMCFG_B2F(pCfg, cxBuf);
                 break;
 
@@ -1065,5 +1065,5 @@
      * the mixer buffer.
      */
-    size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_S2B(pCfg, cAvail), cxBuf);
+    size_t cbToRead = RT_MIN((size_t)PDMAUDIOSTREAMCFG_F2B(pCfg, cAvail), cxBuf);
 
     LogFlowFunc(("cbToRead=%zu, cAvail=%RI32\n", cbToRead, cAvail));
@@ -1077,6 +1077,6 @@
            && RT_SUCCESS(rc))
     {
-        cToRead = RT_MIN(PDMAUDIOSTREAMCFG_B2S(pCfg, cbToRead),
-                         PDMAUDIOSTREAMCFG_B2S(pCfg, pStreamALSA->cbBuf));
+        cToRead = RT_MIN(PDMAUDIOSTREAMCFG_B2F(pCfg, cbToRead),
+                         PDMAUDIOSTREAMCFG_B2F(pCfg, pStreamALSA->cbBuf));
         AssertBreakStmt(cToRead, rc = VERR_NO_DATA);
         cRead = snd_pcm_readi(pStreamALSA->phPCM, pStreamALSA->pvBuf, cToRead);
@@ -1128,5 +1128,5 @@
              * capture device for example).
              */
-            uint32_t cbRead = PDMAUDIOSTREAMCFG_S2B(pCfg, cRead);
+            uint32_t cbRead = PDMAUDIOSTREAMCFG_F2B(pCfg, cRead);
 
             memcpy(pvBuf, pStreamALSA->pvBuf, cbRead);
@@ -1181,5 +1181,5 @@
             break;
 
-        size_t cbToWrite = RT_MIN((unsigned)PDMAUDIOSTREAMCFG_S2B(pCfg, csAvail), pStreamALSA->cbBuf);
+        size_t cbToWrite = RT_MIN((unsigned)PDMAUDIOSTREAMCFG_F2B(pCfg, csAvail), pStreamALSA->cbBuf);
         if (!cbToWrite)
             break;
@@ -1198,5 +1198,5 @@
         {
             csWritten = snd_pcm_writei(pStreamALSA->phPCM, pStreamALSA->pvBuf,
-                                       PDMAUDIOSTREAMCFG_B2S(pCfg, cbToWrite));
+                                       PDMAUDIOSTREAMCFG_B2F(pCfg, cbToWrite));
             if (csWritten <= 0)
             {
@@ -1251,5 +1251,5 @@
             break;
 
-        cbWrittenTotal = PDMAUDIOSTREAMCFG_S2B(pCfg, csWritten);
+        cbWrittenTotal = PDMAUDIOSTREAMCFG_F2B(pCfg, csWritten);
 
     } while (0);
@@ -1320,9 +1320,9 @@
             break;
 
-        pCfgAcq->cSampleBufferHint = obt.samples * 4;
+        pCfgAcq->cFrameBufferHint = obt.samples * 4;
 
         AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
 
-        size_t cbBuf = obt.samples * PDMAUDIOSTREAMCFG_S2B(pCfgAcq, 1);
+        size_t cbBuf = obt.samples * PDMAUDIOSTREAMCFG_F2B(pCfgAcq, 1);
         AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
 
@@ -1375,9 +1375,9 @@
             break;
 
-        pCfgAcq->cSampleBufferHint = obt.samples;
+        pCfgAcq->cFrameBufferHint = obt.samples;
 
         AssertBreakStmt(obt.samples, rc = VERR_INVALID_PARAMETER);
 
-        size_t cbBuf = obt.samples * PDMAUDIOSTREAMCFG_S2B(pCfgAcq, 1);
+        size_t cbBuf = obt.samples * PDMAUDIOSTREAMCFG_F2B(pCfgAcq, 1);
         AssertBreakStmt(cbBuf, rc = VERR_INVALID_PARAMETER);
 
@@ -1644,5 +1644,5 @@
     int rc = alsaStreamGetAvail(pStreamALSA->phPCM, &cFramesAvail);
     if (RT_SUCCESS(rc))
-        cbAvail = PDMAUDIOSTREAMCFG_S2B(pStreamALSA->pCfg, cFramesAvail);
+        cbAvail = PDMAUDIOSTREAMCFG_F2B(pStreamALSA->pCfg, cFramesAvail);
 
     return cbAvail;
@@ -1666,5 +1666,5 @@
         && (uint32_t)cFramesAvail >= pStreamALSA->Out.cSamplesMin)
     {
-        cbAvail = PDMAUDIOSTREAMCFG_S2B(pStreamALSA->pCfg, cFramesAvail);
+        cbAvail = PDMAUDIOSTREAMCFG_F2B(pStreamALSA->pCfg, cFramesAvail);
     }
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 68132)
@@ -1591,5 +1591,5 @@
     }
 
-    rc = RTCircBufCreate(&pCAStream->pCircBuf, PDMAUDIOSTREAMCFG_S2B(pCfgReq, 4096)); /** @todo Make this configurable. */
+    rc = RTCircBufCreate(&pCAStream->pCircBuf, PDMAUDIOSTREAMCFG_F2B(pCfgReq, 4096)); /** @todo Make this configurable. */
     if (RT_FAILURE(rc))
         return rc;
@@ -2308,5 +2308,5 @@
             if (RT_SUCCESS(rc))
             {
-                pCfgAcq->cSampleBufferHint = _4K; /** @todo Make this configurable. */
+                pCfgAcq->cFrameBufferHint = _4K; /** @todo Make this configurable. */
             }
             if (RT_SUCCESS(rc))
Index: /trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostDSound.cpp	(revision 68132)
@@ -733,5 +733,5 @@
 #endif /* VBOX_WITH_AUDIO_DEVICE_CALLBACKS */
 
-        pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, pThis->cfg.cbBufferOut);
+        pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pThis->cfg.cbBufferOut);
 
     } while (0);
@@ -758,6 +758,6 @@
     if (SUCCEEDED(hr))
     {
-        DWORD len1 = PDMAUDIOPCMPROPS_B2S(pProps, cb1);
-        DWORD len2 = PDMAUDIOPCMPROPS_B2S(pProps, cb2);
+        DWORD len1 = PDMAUDIOPCMPROPS_B2F(pProps, cb1);
+        DWORD len2 = PDMAUDIOPCMPROPS_B2F(pProps, cb2);
 
         if (pv1 && len1)
@@ -1170,5 +1170,5 @@
                pStreamDS->In.offCaptureBufRead, pStreamDS->In.cbCaptureBuf));
 
-        pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, pThis->cfg.cbBufferIn);
+        pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pThis->cfg.cbBufferIn);
 
     } while (0);
@@ -1582,5 +1582,5 @@
          * i.e. always leave a free space for 1 audio sample.
          */
-        const DWORD cbSample = PDMAUDIOPCMPROPS_S2B(pProps, 1);
+        const DWORD cbSample = PDMAUDIOPCMPROPS_F2B(pProps, 1);
         if (cbFree <= cbSample)
             break;
Index: /trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostDebugAudio.cpp	(revision 68132)
@@ -125,5 +125,5 @@
 
     if (pCfgAcq)
-        pCfgAcq->cSampleBufferHint = _1K;
+        pCfgAcq->cFrameBufferHint = _1K;
 
     return VINF_SUCCESS;
@@ -138,5 +138,5 @@
     int rc = VINF_SUCCESS;
 
-    pStreamDbg->Out.cbPlayBuffer  = _1K * PDMAUDIOSTREAMCFG_S2B(pCfgReq, 1); /** @todo Make this configurable? */
+    pStreamDbg->Out.cbPlayBuffer  = _1K * PDMAUDIOSTREAMCFG_F2B(pCfgReq, 1); /** @todo Make this configurable? */
     pStreamDbg->Out.auPlayBuffer  = (uint8_t *)RTMemAlloc(pStreamDbg->Out.cbPlayBuffer);
     if (!pStreamDbg->Out.auPlayBuffer)
@@ -170,5 +170,5 @@
     {
         if (pCfgAcq)
-            pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, pStreamDbg->Out.cbPlayBuffer);
+            pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pStreamDbg->Out.cbPlayBuffer);
     }
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostNullAudio.cpp	(revision 68132)
@@ -176,5 +176,5 @@
 
     if (pCfgAcq)
-        pCfgAcq->cSampleBufferHint = _1K;
+        pCfgAcq->cFrameBufferHint = _1K;
 
     return VINF_SUCCESS;
@@ -187,5 +187,5 @@
 
     if (pCfgAcq)
-        pCfgAcq->cSampleBufferHint = _1K; /** @todo Make this configurable. */
+        pCfgAcq->cFrameBufferHint = _1K; /** @todo Make this configurable. */
 
     return VINF_SUCCESS;
Index: /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostOSSAudio.cpp	(revision 68132)
@@ -360,5 +360,5 @@
         {
             DrvAudioHlpClearBuf(&pStreamOSS->pCfg->Props, pStreamOSS->pvBuf, pStreamOSS->cbBuf,
-                                PDMAUDIOPCMPROPS_B2S(&pStreamOSS->pCfg->Props, pStreamOSS->cbBuf));
+                                PDMAUDIOPCMPROPS_B2F(&pStreamOSS->pCfg->Props, pStreamOSS->cbBuf));
 
             int mask = PCM_ENABLE_OUTPUT;
@@ -647,5 +647,5 @@
             }
 
-            uint32_t cSamples = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, ossAcq.cFragments * ossAcq.cbFragmentSize);
+            uint32_t cSamples = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, ossAcq.cFragments * ossAcq.cbFragmentSize);
             if (!cSamples)
                 rc = VERR_INVALID_PARAMETER;
@@ -653,5 +653,5 @@
             if (RT_SUCCESS(rc))
             {
-                size_t cbBuf = PDMAUDIOSTREAMCFG_S2B(pCfgAcq, cSamples);
+                size_t cbBuf = PDMAUDIOSTREAMCFG_F2B(pCfgAcq, cSamples);
                 void  *pvBuf = RTMemAlloc(cbBuf);
                 if (!pvBuf)
@@ -665,5 +665,5 @@
                 pStreamOSS->cbBuf = cbBuf;
 
-                pCfgAcq->cSampleBufferHint = cSamples;
+                pCfgAcq->cFrameBufferHint = cSamples;
             }
         }
@@ -700,5 +700,5 @@
             memcpy(&pCfgAcq->Props, &obtStream.Props, sizeof(PDMAUDIOPCMPROPS));
 
-            cSamples = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, obtStream.cFragments * obtStream.cbFragmentSize);
+            cSamples = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, obtStream.cFragments * obtStream.cbFragmentSize);
 
             if (obtStream.cFragments * obtStream.cbFragmentSize & pStreamOSS->uAlign)
@@ -713,5 +713,5 @@
             pStreamOSS->Out.fMMIO = false;
 
-            size_t cbBuf = PDMAUDIOSTREAMCFG_S2B(pCfgAcq, cSamples);
+            size_t cbBuf = PDMAUDIOSTREAMCFG_F2B(pCfgAcq, cSamples);
             Assert(cbBuf);
 
@@ -781,5 +781,5 @@
             }
 #endif
-            pCfgAcq->cSampleBufferHint = cSamples;
+            pCfgAcq->cFrameBufferHint = cSamples;
         }
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp	(revision 68132)
@@ -776,5 +776,5 @@
     if (cbBuf)
     {
-        pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, cbBuf);
+        pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, cbBuf);
 
         pStreamPA->pDrv = pThis;
@@ -815,5 +815,5 @@
     pCfgAcq->Props.uHz         = pStreamPA->SampleSpec.rate;
     pCfgAcq->Props.cChannels   = pStreamPA->SampleSpec.channels;
-    pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq,
+    pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq,
                                                        RT_MIN(pStreamPA->BufAttr.fragsize * 10, pStreamPA->BufAttr.maxlength));
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/DrvHostValidationKit.cpp	(revision 68132)
@@ -132,5 +132,5 @@
 
     if (pCfgAcq)
-        pCfgAcq->cSampleBufferHint = _1K;
+        pCfgAcq->cFrameBufferHint = _1K;
 
     return VINF_SUCCESS;
@@ -148,5 +148,5 @@
     pStreamDbg->uSamplesSinceStarted = 0;
     pStreamDbg->Out.tsLastPlayed  = 0;
-    pStreamDbg->Out.cbPlayBuffer  = 16 * _1K * PDMAUDIOSTREAMCFG_S2B(pCfgReq, 1); /** @todo Make this configurable? */
+    pStreamDbg->Out.cbPlayBuffer  = 16 * _1K * PDMAUDIOSTREAMCFG_F2B(pCfgReq, 1); /** @todo Make this configurable? */
     pStreamDbg->Out.pu8PlayBuffer = (uint8_t *)RTMemAlloc(pStreamDbg->Out.cbPlayBuffer);
     if (!pStreamDbg->Out.pu8PlayBuffer)
@@ -200,5 +200,5 @@
     {
         if (pCfgAcq)
-            pCfgAcq->cSampleBufferHint = PDMAUDIOSTREAMCFG_B2S(pCfgAcq, pStreamDbg->Out.cbPlayBuffer);
+            pCfgAcq->cFrameBufferHint = PDMAUDIOSTREAMCFG_B2F(pCfgAcq, pStreamDbg->Out.cbPlayBuffer);
     }
 
Index: /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 68131)
+++ /trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 68132)
@@ -62,41 +62,40 @@
     RTTESTI_CHECK_RC_OK(AudioMixBufInit(&mb, "Single", &config, cBufSize));
     RTTESTI_CHECK(AudioMixBufSize(&mb) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_B2S(&mb, AudioMixBufSizeBytes(&mb)) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_S2B(&mb, AudioMixBufSize(&mb)) == AudioMixBufSizeBytes(&mb));
+    RTTESTI_CHECK(AUDIOMIXBUF_B2F(&mb, AudioMixBufSizeBytes(&mb)) == cBufSize);
+    RTTESTI_CHECK(AUDIOMIXBUF_F2B(&mb, AudioMixBufSize(&mb)) == AudioMixBufSizeBytes(&mb));
     RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize);
-    RTTESTI_CHECK(AUDIOMIXBUF_S2B(&mb, AudioMixBufFree(&mb)) == AudioMixBufFreeBytes(&mb));
+    RTTESTI_CHECK(AUDIOMIXBUF_F2B(&mb, AudioMixBufFree(&mb)) == AudioMixBufFreeBytes(&mb));
 
     /*
      * Absolute writes.
      */
-    uint32_t cSamplesRead  = 0, cSamplesWritten = 0, cSamplesWrittenAbs = 0;
-    int8_t  samples8 [2] = { 0x12, 0x34 };
-    int16_t samples16[2] = { 0xAA, 0xBB };
-    int32_t samples32[2] = { 0xCC, 0xDD };
-    /* int64_t samples64[2] = { 0xEE, 0xFF }; - unused */
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, &samples8, sizeof(samples8), &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == 0 /* Samples */);
+    uint32_t cFramesRead  = 0, cFramesWritten = 0, cFramesWrittenAbs = 0;
+    int8_t  aFrames8 [2] = { 0x12, 0x34 };
+    int16_t aFrames16[2] = { 0xAA, 0xBB };
+    int32_t aFrames32[2] = { 0xCC, 0xDD };
+
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, &aFrames8, sizeof(aFrames8), &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == 0 /* Frames */);
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == 0);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, &samples16, sizeof(samples16), &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == 1 /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, &aFrames16, sizeof(aFrames16), &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == 1 /* Frames */);
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == 1);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2 /* Offset */, &samples32, sizeof(samples32), &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == 2 /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2 /* Offset */, &aFrames32, sizeof(aFrames32), &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == 2 /* Frames */);
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == 2);
 
     /* Beyond buffer. */
-    RTTESTI_CHECK_RC(AudioMixBufWriteAt(&mb, AudioMixBufSize(&mb) + 1, &samples16, sizeof(samples16),
-                                        &cSamplesWritten), VERR_BUFFER_OVERFLOW);
-
-    /* Offset wrap-around: When writing as much (or more) samples the mixing buffer can hold. */
+    RTTESTI_CHECK_RC(AudioMixBufWriteAt(&mb, AudioMixBufSize(&mb) + 1, &aFrames16, sizeof(aFrames16),
+                                        &cFramesWritten), VERR_BUFFER_OVERFLOW);
+
+    /* Offset wrap-around: When writing as much (or more) frames the mixing buffer can hold. */
     uint32_t  cbSamples = cBufSize * sizeof(int16_t) * 2 /* Channels */;
     RTTESTI_CHECK(cbSamples);
     uint16_t *paSamples = (uint16_t *)RTMemAlloc(cbSamples);
     RTTESTI_CHECK(paSamples);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, paSamples, cbSamples, &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == cBufSize /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 0 /* Offset */, paSamples, cbSamples, &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == cBufSize /* Frames */);
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize);
     RTTESTI_CHECK(AudioMixBufReadPos(&mb) == 0);
@@ -110,46 +109,46 @@
     AudioMixBufReset(&mb);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2 /* Offset */, &samples32, sizeof(samples32), &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == 2 /* Samples */);
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteAt(&mb, 2 /* Offset */, &aFrames32, sizeof(aFrames32), &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == 2 /* Frames */);
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == 2);
 
-    cSamplesWrittenAbs = AudioMixBufUsed(&mb);
-
-    uint32_t cToWrite = AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1; /* -1 as padding plus -2 samples for above. */
+    cFramesWrittenAbs = AudioMixBufUsed(&mb);
+
+    uint32_t cToWrite = AudioMixBufSize(&mb) - cFramesWrittenAbs - 1; /* -1 as padding plus -2 frames for above. */
     for (uint32_t i = 0; i < cToWrite; i++)
     {
-        RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &cSamplesWritten));
-        RTTESTI_CHECK(cSamplesWritten == 1);
+        RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &aFrames16, sizeof(aFrames16), &cFramesWritten));
+        RTTESTI_CHECK(cFramesWritten == 1);
     }
     RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
     RTTESTI_CHECK(AudioMixBufFree(&mb) == 1);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 1U));
-    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cToWrite + cSamplesWrittenAbs /* + last absolute write */);
-
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &samples16, sizeof(samples16), &cSamplesWritten));
-    RTTESTI_CHECK(cSamplesWritten == 1);
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_F2B(&mb, 1U));
+    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cToWrite + cFramesWrittenAbs /* + last absolute write */);
+
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&mb, &aFrames16, sizeof(aFrames16), &cFramesWritten));
+    RTTESTI_CHECK(cFramesWritten == 1);
     RTTESTI_CHECK(AudioMixBufFree(&mb) == 0);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, 0U));
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_F2B(&mb, 0U));
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize);
 
     /* Circular reads. */
-    uint32_t cToRead = AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1;
+    uint32_t cToRead = AudioMixBufSize(&mb) - cFramesWrittenAbs - 1;
     for (uint32_t i = 0; i < cToRead; i++)
     {
-        RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &cSamplesRead));
-        RTTESTI_CHECK(cSamplesRead == 1);
-        AudioMixBufFinish(&mb, cSamplesRead);
+        RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &aFrames16, sizeof(aFrames16), &cFramesRead));
+        RTTESTI_CHECK(cFramesRead == 1);
+        AudioMixBufFinish(&mb, cFramesRead);
     }
     RTTESTI_CHECK(!AudioMixBufIsEmpty(&mb));
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == AudioMixBufSize(&mb) - cSamplesWrittenAbs - 1);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - cSamplesWrittenAbs - 1));
+    RTTESTI_CHECK(AudioMixBufFree(&mb) == AudioMixBufSize(&mb) - cFramesWrittenAbs - 1);
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_F2B(&mb, cBufSize - cFramesWrittenAbs - 1));
     RTTESTI_CHECK(AudioMixBufUsed(&mb) == cBufSize - cToRead);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &samples16, sizeof(samples16), &cSamplesRead));
-    RTTESTI_CHECK(cSamplesRead == 1);
-    AudioMixBufFinish(&mb, cSamplesRead);
-    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize - cSamplesWrittenAbs);
-    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_S2B(&mb, cBufSize - cSamplesWrittenAbs));
-    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cSamplesWrittenAbs);
+    RTTESTI_CHECK_RC_OK(AudioMixBufReadCirc(&mb, &aFrames16, sizeof(aFrames16), &cFramesRead));
+    RTTESTI_CHECK(cFramesRead == 1);
+    AudioMixBufFinish(&mb, cFramesRead);
+    RTTESTI_CHECK(AudioMixBufFree(&mb) == cBufSize - cFramesWrittenAbs);
+    RTTESTI_CHECK(AudioMixBufFreeBytes(&mb) == AUDIOMIXBUF_F2B(&mb, cBufSize - cFramesWrittenAbs));
+    RTTESTI_CHECK(AudioMixBufUsed(&mb) == cFramesWrittenAbs);
 
     AudioMixBufDestroy(&mb);
@@ -191,6 +190,6 @@
     RTTESTI_CHECK(DrvAudioHlpPCMPropsAreValid(&cfg_c1));
 
-    uint32_t cSamples      = 16;
-    uint32_t cChildBufSize = RTRandU32Ex(cSamples /* Min */, 64 /* Max */);
+    uint32_t cFrames      = 16;
+    uint32_t cChildBufSize = RTRandU32Ex(cFrames /* Min */, 64 /* Max */);
 
     PDMAUDIOMIXBUF child1;
@@ -220,15 +219,15 @@
     uint32_t cbBuf = _1K;
     char pvBuf[_1K];
-    int16_t samples[32] = { 0xAA, 0xBB };
-    uint32_t cSamplesRead, cSamplesWritten, cSamplesMixed;
-
-    uint32_t cSamplesChild1  = cSamples;
-    uint32_t cSamplesChild2  = cSamples;
+    int16_t aFrames16[32] = { 0xAA, 0xBB };
+    uint32_t cFramesRead, cFramesWritten, cFramesMixed;
+
+    uint32_t cFramesChild1  = cFrames;
+    uint32_t cFramesChild2  = cFrames;
 
     uint32_t t = RTRandU32() % 32;
 
     RTTestPrintf(hTest, RTTESTLVL_DEBUG,
-                 "cParentBufSize=%RU32, cChildBufSize=%RU32, %RU32 samples -> %RU32 iterations total\n",
-                 cParentBufSize, cChildBufSize, cSamples, t);
+                 "cParentBufSize=%RU32, cChildBufSize=%RU32, %RU32 frames -> %RU32 iterations total\n",
+                 cParentBufSize, cChildBufSize, cFrames, t);
 
     /*
@@ -248,12 +247,12 @@
         {
             /* Child 1. */
-            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child1, 0, &samples, sizeof(samples), &cSamplesWritten));
-            RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesChild1, ("Child1: Expected %RU32 written samples, got %RU32\n", cSamplesChild1, cSamplesWritten));
-            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child1, cSamplesWritten, &cSamplesMixed));
-
-            cChildrenSamplesMixedTotal += cSamplesMixed;
-
-            RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesMixed, ("Child1: Expected %RU32 mixed samples, got %RU32\n", cSamplesWritten, cSamplesMixed));
-            RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child1) == 0, ("Child1: Expected %RU32 used samples, got %RU32\n", 0, AudioMixBufUsed(&child1)));
+            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child1, 0, &aFrames16, sizeof(aFrames16), &cFramesWritten));
+            RTTESTI_CHECK_MSG_BREAK(cFramesWritten == cFramesChild1, ("Child1: Expected %RU32 written frames, got %RU32\n", cFramesChild1, cFramesWritten));
+            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child1, cFramesWritten, &cFramesMixed));
+
+            cChildrenSamplesMixedTotal += cFramesMixed;
+
+            RTTESTI_CHECK_MSG_BREAK(cFramesWritten == cFramesMixed, ("Child1: Expected %RU32 mixed frames, got %RU32\n", cFramesWritten, cFramesMixed));
+            RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child1) == 0, ("Child1: Expected %RU32 used frames, got %RU32\n", 0, AudioMixBufUsed(&child1)));
         }
 
@@ -263,16 +262,16 @@
         {
             /* Child 2. */
-            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child2, 0, &samples, sizeof(samples), &cSamplesWritten));
-            RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesChild2, ("Child2: Expected %RU32 written samples, got %RU32\n", cSamplesChild2, cSamplesWritten));
-            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child2, cSamplesWritten, &cSamplesMixed));
-
-            cChildrenSamplesMixedTotal += cSamplesMixed;
-
-            RTTESTI_CHECK_MSG_BREAK(cSamplesWritten == cSamplesMixed, ("Child2: Expected %RU32 mixed samples, got %RU32\n", cSamplesWritten, cSamplesMixed));
-            RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child2) == 0, ("Child2: Expected %RU32 used samples, got %RU32\n", 0, AudioMixBufUsed(&child2)));
+            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufWriteAt(&child2, 0, &aFrames16, sizeof(aFrames16), &cFramesWritten));
+            RTTESTI_CHECK_MSG_BREAK(cFramesWritten == cFramesChild2, ("Child2: Expected %RU32 written frames, got %RU32\n", cFramesChild2, cFramesWritten));
+            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufMixToParent(&child2, cFramesWritten, &cFramesMixed));
+
+            cChildrenSamplesMixedTotal += cFramesMixed;
+
+            RTTESTI_CHECK_MSG_BREAK(cFramesWritten == cFramesMixed, ("Child2: Expected %RU32 mixed frames, got %RU32\n", cFramesWritten, cFramesMixed));
+            RTTESTI_CHECK_MSG_BREAK(AudioMixBufUsed(&child2) == 0, ("Child2: Expected %RU32 used frames, got %RU32\n", 0, AudioMixBufUsed(&child2)));
         }
 
         /*
-         * Read out all samples from the parent buffer and also mark the just-read samples as finished
+         * Read out all frames from the parent buffer and also mark the just-read frames as finished
          * so that both connected children buffers can keep track of their stuff.
          */
@@ -280,12 +279,12 @@
         while (cParentSamples)
         {
-            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, pvBuf, cbBuf, &cSamplesRead));
-            if (!cSamplesRead)
+            RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, pvBuf, cbBuf, &cFramesRead));
+            if (!cFramesRead)
                 break;
 
-            AudioMixBufFinish(&parent, cSamplesRead);
-
-            RTTESTI_CHECK(cParentSamples >= cSamplesRead);
-            cParentSamples -= cSamplesRead;
+            AudioMixBufFinish(&parent, cFramesRead);
+
+            RTTESTI_CHECK(cParentSamples >= cFramesRead);
+            cParentSamples -= cFramesRead;
         }
 
@@ -331,6 +330,6 @@
      * take shortcuts and performs conversion. Because conversion to double
      * the sample rate effectively inserts one additional sample between every
-     * two source samples, N source samples will be converted to N * 2 - 1
-     * samples. However, the last source sample will be saved for later
+     * two source frames, N source frames will be converted to N * 2 - 1
+     * frames. However, the last source sample will be saved for later
      * interpolation and not immediately output.
      */
@@ -353,7 +352,7 @@
     RTTESTI_CHECK_RC_OK(AudioMixBufLinkTo(&child, &parent));
 
-    /* 8-bit unsigned samples. Often used with SB16 device. */
-    uint8_t samples[16]  = { 0xAA, 0xBB, 0, 1, 43, 125, 126, 127,
-                             128, 129, 130, 131, 132, UINT8_MAX - 1, UINT8_MAX, 0 };
+    /* 8-bit unsigned frames. Often used with SB16 device. */
+    uint8_t aFrames8U[16]  = { 0xAA, 0xBB, 0, 1, 43, 125, 126, 127,
+                               128, 129, 130, 131, 132, UINT8_MAX - 1, UINT8_MAX, 0 };
 
     /*
@@ -362,17 +361,17 @@
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
-
-    uint32_t cSamplesChild  = 16;
-    uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesTotalRead   = 0;
+    uint32_t    cFramesRead, cFramesWritten, cFramesMixed;
+
+    uint32_t cFramesChild  = 16;
+    uint32_t cFramesParent = cFramesChild * 2 - 2;
+    uint32_t cFramesTotalRead   = 0;
 
     /**** 8-bit unsigned samples ****/
     RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 8-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
-    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
-    uint32_t cSamples = AudioMixBufUsed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cSamples, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), cSamples));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &aFrames8U, sizeof(aFrames8U), &cFramesWritten));
+    RTTESTI_CHECK_MSG(cFramesWritten == cFramesChild, ("Child: Expected %RU32 written frames, got %RU32\n", cFramesChild, cFramesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cFramesWritten, &cFramesMixed));
+    uint32_t cFrames = AudioMixBufUsed(&parent);
+    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cFrames, ("Child: Expected %RU32 mixed frames, got %RU32\n", AudioMixBufLive(&child), cFrames));
 
     RTTESTI_CHECK(AudioMixBufUsed(&parent) == AudioMixBufLive(&child));
@@ -380,19 +379,19 @@
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
-        if (!cSamplesRead)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cFramesRead));
+        if (!cFramesRead)
             break;
-        cSamplesTotalRead += cSamplesRead;
-        AudioMixBufFinish(&parent, cSamplesRead);
-    }
-
-    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
-
-    /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
+        cFramesTotalRead += cFramesRead;
+        AudioMixBufFinish(&parent, cFramesRead);
+    }
+
+    RTTESTI_CHECK_MSG(cFramesTotalRead == cFramesParent, ("Parent: Expected %RU32 mixed frames, got %RU32\n", cFramesParent, cFramesTotalRead));
+
+    /* Check that the frames came out unharmed. Every other sample is interpolated and we ignore it. */
     /* NB: This also checks that the default volume setting is 0dB attenuation. */
-    uint8_t *pSrc8 = &samples[0];
+    uint8_t *pSrc8 = &aFrames8U[0];
     uint8_t *pDst8 = (uint8_t *)achBuf;
 
-    for (i = 0; i < cSamplesChild - 1; ++i)
+    for (i = 0; i < cFramesChild - 1; ++i)
     {
         RTTESTI_CHECK_MSG(*pSrc8 == *pDst8, ("index %u: Dst=%d, Src=%d\n", i, *pDst8, *pSrc8));
@@ -452,6 +451,6 @@
 
     /* 16-bit signed. More or less exclusively used as output, and usually as input, too. */
-    int16_t     samples[16] = { 0xAA, 0xBB, INT16_MIN, INT16_MIN + 1, INT16_MIN / 2, -3, -2, -1,
-                                0, 1, 2, 3, INT16_MAX / 2, INT16_MAX - 1, INT16_MAX, 0 };
+    int16_t     aFrames16S[16] = { 0xAA, 0xBB, INT16_MIN, INT16_MIN + 1, INT16_MIN / 2, -3, -2, -1,
+                                   0, 1, 2, 3, INT16_MAX / 2, INT16_MAX - 1, INT16_MAX, 0 };
 
     /*
@@ -460,17 +459,17 @@
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
-
-    uint32_t cSamplesChild  = 16;
-    uint32_t cSamplesParent = cSamplesChild * 2 - 2;
-    uint32_t cSamplesTotalRead   = 0;
+    uint32_t    cFramesRead, cFramesWritten, cFramesMixed;
+
+    uint32_t cFramesChild  = 16;
+    uint32_t cFramesParent = cFramesChild * 2 - 2;
+    uint32_t cFramesTotalRead   = 0;
 
     /**** 16-bit signed samples ****/
     RTTestPrintf(hTest, RTTESTLVL_DEBUG, "Conversion test %uHz %uch 16-bit\n", cfg_c.uHz, cfg_c.cChannels);
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
-    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
-    uint32_t cSamples = AudioMixBufUsed(&parent);
-    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cSamples, ("Child: Expected %RU32 mixed samples, got %RU32\n", AudioMixBufLive(&child), cSamples));
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &aFrames16S, sizeof(aFrames16S), &cFramesWritten));
+    RTTESTI_CHECK_MSG(cFramesWritten == cFramesChild, ("Child: Expected %RU32 written frames, got %RU32\n", cFramesChild, cFramesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cFramesWritten, &cFramesMixed));
+    uint32_t cFrames = AudioMixBufUsed(&parent);
+    RTTESTI_CHECK_MSG(AudioMixBufLive(&child) == cFrames, ("Child: Expected %RU32 mixed frames, got %RU32\n", AudioMixBufLive(&child), cFrames));
 
     RTTESTI_CHECK(AudioMixBufUsed(&parent) == AudioMixBufLive(&child));
@@ -478,18 +477,18 @@
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
-        if (!cSamplesRead)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cFramesRead));
+        if (!cFramesRead)
             break;
-        cSamplesTotalRead += cSamplesRead;
-        AudioMixBufFinish(&parent, cSamplesRead);
-    }
-    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
-
-    /* Check that the samples came out unharmed. Every other sample is interpolated and we ignore it. */
+        cFramesTotalRead += cFramesRead;
+        AudioMixBufFinish(&parent, cFramesRead);
+    }
+    RTTESTI_CHECK_MSG(cFramesTotalRead == cFramesParent, ("Parent: Expected %RU32 mixed frames, got %RU32\n", cFramesParent, cFramesTotalRead));
+
+    /* Check that the frames came out unharmed. Every other sample is interpolated and we ignore it. */
     /* NB: This also checks that the default volume setting is 0dB attenuation. */
-    int16_t *pSrc16 = &samples[0];
+    int16_t *pSrc16 = &aFrames16S[0];
     int16_t *pDst16 = (int16_t *)achBuf;
 
-    for (i = 0; i < cSamplesChild - 1; ++i)
+    for (i = 0; i < cFramesChild - 1; ++i)
     {
         RTTESTI_CHECK_MSG(*pSrc16 == *pDst16, ("index %u: Dst=%d, Src=%d\n", i, *pDst16, *pSrc16));
@@ -538,6 +537,6 @@
 
     /* A few 16-bit signed samples. */
-    int16_t     samples[16] = { INT16_MIN, INT16_MIN + 1, -128, -64, -4, -1, 0, 1,
-                                2, 255, 256, INT16_MAX / 2, INT16_MAX - 2, INT16_MAX - 1, INT16_MAX, 0 };
+    int16_t     aFrames16S[16] = { INT16_MIN, INT16_MIN + 1, -128, -64, -4, -1, 0, 1,
+                                   2, 255, 256, INT16_MAX / 2, INT16_MAX - 2, INT16_MAX - 1, INT16_MAX, 0 };
 
     /*
@@ -546,9 +545,9 @@
     uint32_t    cbBuf = 256;
     char        achBuf[256];
-    uint32_t    cSamplesRead, cSamplesWritten, cSamplesMixed;
-
-    uint32_t cSamplesChild  = 8;
-    uint32_t cSamplesParent = cSamplesChild;
-    uint32_t cSamplesTotalRead;
+    uint32_t    cFramesRead, cFramesWritten, cFramesMixed;
+
+    uint32_t cFramesChild  = 8;
+    uint32_t cFramesParent = cFramesChild;
+    uint32_t cFramesTotalRead;
     int16_t *pSrc16;
     int16_t *pDst16;
@@ -561,24 +560,24 @@
     AudioMixBufSetVolume(&child, &vol);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
-    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
-
-    cSamplesTotalRead = 0;
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &aFrames16S, sizeof(aFrames16S), &cFramesWritten));
+    RTTESTI_CHECK_MSG(cFramesWritten == cFramesChild, ("Child: Expected %RU32 written frames, got %RU32\n", cFramesChild, cFramesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cFramesWritten, &cFramesMixed));
+
+    cFramesTotalRead = 0;
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
-        if (!cSamplesRead)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cFramesRead));
+        if (!cFramesRead)
             break;
-        cSamplesTotalRead += cSamplesRead;
-        AudioMixBufFinish(&parent, cSamplesRead);
-    }
-    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
-
-    /* Check that at 0dB the samples came out unharmed. */
-    pSrc16 = &samples[0];
+        cFramesTotalRead += cFramesRead;
+        AudioMixBufFinish(&parent, cFramesRead);
+    }
+    RTTESTI_CHECK_MSG(cFramesTotalRead == cFramesParent, ("Parent: Expected %RU32 mixed frames, got %RU32\n", cFramesParent, cFramesTotalRead));
+
+    /* Check that at 0dB the frames came out unharmed. */
+    pSrc16 = &aFrames16S[0];
     pDst16 = (int16_t *)achBuf;
 
-    for (i = 0; i < cSamplesParent * 2 /* stereo */; ++i)
+    for (i = 0; i < cFramesParent * 2 /* stereo */; ++i)
     {
         RTTESTI_CHECK_MSG(*pSrc16 == *pDst16, ("index %u: Dst=%d, Src=%d\n", i, *pDst16, *pSrc16));
@@ -592,24 +591,24 @@
     AudioMixBufSetVolume(&child, &vol);
 
-    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &samples, sizeof(samples), &cSamplesWritten));
-    RTTESTI_CHECK_MSG(cSamplesWritten == cSamplesChild, ("Child: Expected %RU32 written samples, got %RU32\n", cSamplesChild, cSamplesWritten));
-    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cSamplesWritten, &cSamplesMixed));
-
-    cSamplesTotalRead = 0;
+    RTTESTI_CHECK_RC_OK(AudioMixBufWriteCirc(&child, &aFrames16S, sizeof(aFrames16S), &cFramesWritten));
+    RTTESTI_CHECK_MSG(cFramesWritten == cFramesChild, ("Child: Expected %RU32 written frames, got %RU32\n", cFramesChild, cFramesWritten));
+    RTTESTI_CHECK_RC_OK(AudioMixBufMixToParent(&child, cFramesWritten, &cFramesMixed));
+
+    cFramesTotalRead = 0;
     for (;;)
     {
-        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cSamplesRead));
-        if (!cSamplesRead)
+        RTTESTI_CHECK_RC_OK_BREAK(AudioMixBufReadCirc(&parent, achBuf, cbBuf, &cFramesRead));
+        if (!cFramesRead)
             break;
-        cSamplesTotalRead += cSamplesRead;
-        AudioMixBufFinish(&parent, cSamplesRead);
-    }
-    RTTESTI_CHECK_MSG(cSamplesTotalRead == cSamplesParent, ("Parent: Expected %RU32 mixed samples, got %RU32\n", cSamplesParent, cSamplesTotalRead));
+        cFramesTotalRead += cFramesRead;
+        AudioMixBufFinish(&parent, cFramesRead);
+    }
+    RTTESTI_CHECK_MSG(cFramesTotalRead == cFramesParent, ("Parent: Expected %RU32 mixed frames, got %RU32\n", cFramesParent, cFramesTotalRead));
 
     /* Check that at -6dB the sample values are halved. */
-    pSrc16 = &samples[0];
+    pSrc16 = &aFrames16S[0];
     pDst16 = (int16_t *)achBuf;
 
-    for (i = 0; i < cSamplesParent * 2 /* stereo */; ++i)
+    for (i = 0; i < cFramesParent * 2 /* stereo */; ++i)
     {
         /* Watch out! For negative values, x >> 1 is not the same as x / 2. */
Index: /trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp	(revision 68131)
+++ /trunk/src/VBox/Main/src-client/DrvAudioVRDE.cpp	(revision 68132)
@@ -86,5 +86,5 @@
 
 /* Sanity. */
-AssertCompileSize(PDMAUDIOSAMPLE, sizeof(int64_t) * 2 /* st_sample_t using by VRDP server */);
+AssertCompileSize(PDMAUDIOFRAME, sizeof(int64_t) * 2 /* st_sample_t using by VRDP server */);
 
 static int vrdeCreateStreamIn(PVRDESTREAM pStreamVRDE, PPDMAUDIOSTREAMCFG pCfgReq, PPDMAUDIOSTREAMCFG pCfgAcq)
@@ -105,5 +105,5 @@
              */
             pCfgAcq->enmLayout         = PDMAUDIOSTREAMLAYOUT_RAW;
-            pCfgAcq->cSampleBufferHint = pStreamVRDE->In.csMax;
+            pCfgAcq->cFrameBufferHint = pStreamVRDE->In.csMax;
         }
     }
@@ -127,5 +127,5 @@
          */
         pCfgAcq->enmLayout         = PDMAUDIOSTREAMLAYOUT_RAW;
-        pCfgAcq->cSampleBufferHint = _4K; /** @todo Make this configurable. */
+        pCfgAcq->cFrameBufferHint = _4K; /** @todo Make this configurable. */
     }
 
@@ -292,5 +292,5 @@
     int rc = VINF_SUCCESS;
 
-    PPDMAUDIOSAMPLE paSampleBuf = (PPDMAUDIOSAMPLE)pvBuf;
+    PPDMAUDIOFRAME paSampleBuf = (PPDMAUDIOFRAME)pvBuf;
     AssertPtr(paSampleBuf);
 
@@ -501,5 +501,5 @@
         /* Return samples instead of bytes here
          * (since we specified PDMAUDIOSTREAMLAYOUT_RAW as the audio data layout). */
-        return (uint32_t)PDMAUDIOSTREAMCFG_B2S(pStreamVRDE->pCfg, RTCircBufUsed(pStreamVRDE->In.pCircBuf));
+        return (uint32_t)PDMAUDIOSTREAMCFG_B2F(pStreamVRDE->pCfg, RTCircBufUsed(pStreamVRDE->In.pCircBuf));
     }
 
Index: /trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp	(revision 68131)
+++ /trunk/src/VBox/Main/src-client/DrvAudioVideoRec.cpp	(revision 68132)
@@ -375,5 +375,5 @@
 
         if (pCfgAcq)
-            pCfgAcq->cSampleBufferHint = 0;
+            pCfgAcq->cFrameBufferHint = 0;
 
         LogRel2(("VideoRec: Support for surround audio not implemented yet\n"));
@@ -409,5 +409,5 @@
             pCfgAcq->Props.uHz         = pSink->Codec.Parms.uHz;
             pCfgAcq->Props.cShift      = PDMAUDIOPCMPROPS_MAKE_SHIFT_PARMS(pCfgAcq->Props.cBits, pCfgAcq->Props.cChannels);
-            pCfgAcq->cSampleBufferHint = _4K; /** @todo Make this configurable. */
+            pCfgAcq->cFrameBufferHint = _4K; /** @todo Make this configurable. */
         }
     }
@@ -586,5 +586,5 @@
 
     const uint32_t csFrame = pSink->Codec.Opus.csFrame;
-    const uint32_t cbFrame = PDMAUDIOSTREAMCFG_S2B(pStreamAV->pCfg, csFrame);
+    const uint32_t cbFrame = PDMAUDIOSTREAMCFG_F2B(pStreamAV->pCfg, csFrame);
 
     while (RTCircBufUsed(pCircBuf) >= cbFrame)
