Index: trunk/src/VBox/Devices/Audio/DrvAudio.h
===================================================================
--- trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 88006)
+++ trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 88007)
@@ -195,10 +195,14 @@
 /** @name Audio calculation helper methods.
  * @{ */
+uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
+/** @} */
+
+/** @name Audio PCM properties helper methods.
+ * @{ */
 void     DrvAudioHlpClearBuf(PCPDMAUDIOPCMPROPS pPCMProps, void *pvBuf, size_t cbBuf, uint32_t cFrames);
-uint32_t DrvAudioHlpCalcBitrate(uint8_t cBits, uint32_t uHz, uint8_t cChannels);
 uint32_t DrvAudioHlpGetBitrate(PCPDMAUDIOPCMPROPS pProps);
 uint32_t DrvAudioHlpFloorBytesToFrame(PCPDMAUDIOPCMPROPS pProps, uint32_t cb);
 bool     DrvAudioHlpIsBytesAligned(PCPDMAUDIOPCMPROPS pProps, uint32_t cb);
-uint32_t DrvAudioHlpBytesToFrames(uint32_t cbBytes, PCPDMAUDIOPCMPROPS pProps);
+uint32_t DrvAudioHlpBytesToFrames(PCPDMAUDIOPCMPROPS pProps, uint32_t cb);
 uint64_t DrvAudioHlpBytesToMilli(PCPDMAUDIOPCMPROPS pProps, uint32_t cb);
 uint64_t DrvAudioHlpBytesToMicro(PCPDMAUDIOPCMPROPS pProps, uint32_t cb);
@@ -211,14 +215,11 @@
 uint32_t DrvAudioHlpMilliToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cMs);
 uint32_t DrvAudioHlpNanoToFrames(PCPDMAUDIOPCMPROPS pProps, uint64_t cNs);
-/** @}  */
-
-/** @name Audio PCM properties helper methods.
- * @{ */
-bool DrvAudioHlpPCMPropsAreEqual(PCPDMAUDIOPCMPROPS pPCMProps1, PCPDMAUDIOPCMPROPS pPCMProps2);
-bool DrvAudioHlpPCMPropsAreEqual(PCPDMAUDIOPCMPROPS pPCMProps, PCPDMAUDIOSTREAMCFG pCfg);
-bool DrvAudioHlpPCMPropsAreValid(PCPDMAUDIOPCMPROPS pProps);
+
+bool     DrvAudioHlpPCMPropsAreEqual(PCPDMAUDIOPCMPROPS pPCMProps1, PCPDMAUDIOPCMPROPS pPCMProps2);
+bool     DrvAudioHlpPCMPropsAreEqual(PCPDMAUDIOPCMPROPS pPCMProps, PCPDMAUDIOSTREAMCFG pCfg);
+bool     DrvAudioHlpPCMPropsAreValid(PCPDMAUDIOPCMPROPS pProps);
 uint32_t DrvAudioHlpPCMPropsBytesPerFrame(PCPDMAUDIOPCMPROPS pProps);
-void DrvAudioHlpPCMPropsPrint(PCPDMAUDIOPCMPROPS pProps);
-int DrvAudioHlpPCMPropsToStreamCfg(PCPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
+void     DrvAudioHlpPCMPropsPrint(PCPDMAUDIOPCMPROPS pProps);
+int      DrvAudioHlpPCMPropsToStreamCfg(PCPDMAUDIOPCMPROPS pPCMProps, PPDMAUDIOSTREAMCFG pCfg);
 /** @}  */
 
Index: trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 88006)
+++ trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 88007)
@@ -1198,15 +1198,14 @@
 
 /**
- * Returns the number of audio frames for a given amount of bytes.
- *
- * @return Calculated audio frames for given bytes.
- * @param  cbBytes              Bytes to convert to audio frames.
- * @param  pProps               PCM properties to calulate frames for.
- */
-uint32_t DrvAudioHlpBytesToFrames(uint32_t cbBytes, PCPDMAUDIOPCMPROPS pProps)
+ * Converts bytes to frames (rounding down of course).
+ *
+ * @returns Number of frames.
+ * @param   pProps      PCM properties to use.
+ * @param   cb          The number of bytes to convert.
+ */
+uint32_t DrvAudioHlpBytesToFrames(PCPDMAUDIOPCMPROPS pProps, uint32_t cb)
 {
     AssertPtrReturn(pProps, 0);
-
-    return PDMAUDIOPCMPROPS_B2F(pProps, cbBytes);
+    return PDMAUDIOPCMPROPS_B2F(pProps, cb);
 }
 
Index: trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp
===================================================================
--- trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 88006)
+++ trunk/src/VBox/Devices/Audio/testcase/tstAudioMixBuffer.cpp	(revision 88007)
@@ -101,10 +101,7 @@
                       ("cb=%RU32\n", u32));
 
-    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(4, &s_Cfg441StereoS16)) == 1,
-                      ("cb=%RU32\n", u32));
-    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(4, &s_Cfg441StereoU16)) == 1,
-                      ("cb=%RU32\n", u32));
-    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(8, &s_Cfg441StereoU32)) == 1,
-                      ("cb=%RU32\n", u32));
+    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(&s_Cfg441StereoS16, 4)) == 1, ("cb=%RU32\n", u32));
+    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(&s_Cfg441StereoU16, 4)) == 1, ("cb=%RU32\n", u32));
+    RTTESTI_CHECK_MSG((u32 = DrvAudioHlpBytesToFrames(&s_Cfg441StereoU32, 8)) == 1, ("cb=%RU32\n", u32));
 
     uint64_t u64;
