Index: /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 73531)
+++ /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 73532)
@@ -874,5 +874,5 @@
 uint32_t DrvAudioHlpPCMPropsBytesPerFrame(const PPDMAUDIOPCMPROPS pProps)
 {
-    return pProps->cBytes * pProps->cChannels;
+    return PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
 }
 
@@ -1137,6 +1137,5 @@
         return 0;
 
-    const uint32_t cbFrameSize = DrvAudioHlpPCMPropsBytesPerFrame(pProps);
-    return (cbSize / cbFrameSize) * cbFrameSize;
+    return PDMAUDIOPCMPROPS_B2F(pProps, cbSize) * PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
 }
 
@@ -1155,5 +1154,16 @@
         return true;
 
-    return (cbSize % DrvAudioHlpPCMPropsBytesPerFrame(pProps) == 0);
+    return (cbSize % PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */) == 0);
+}
+
+/**
+ * Returns the bytes per second for given PCM properties.
+ *
+ * @returns Bytes per second.
+ * @param   pProps              PCM properties to retrieve size for.
+ */
+DECLINLINE(uint64_t) drvAudioHlpBytesPerSec(const PPDMAUDIOPCMPROPS pProps)
+{
+    return PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */) * pProps->uHz;
 }
 
@@ -1169,5 +1179,5 @@
     AssertPtrReturn(pProps, 0);
 
-    return cbBytes / (pProps->cBytes * pProps->cChannels);
+    return PDMAUDIOPCMPROPS_B2F(pProps, cbBytes);
 }
 
@@ -1186,6 +1196,5 @@
         return 0;
 
-    const uint64_t cbBytesPerSec = pProps->cBytes * pProps->cChannels * pProps->uHz;
-    const double dbBytesPerMs = (double)cbBytesPerSec / (double)RT_MS_1SEC;
+    const double dbBytesPerMs = (double)drvAudioHlpBytesPerSec(pProps) / (double)RT_MS_1SEC;
     Assert(dbBytesPerMs >= 0.0f);
     if (!dbBytesPerMs) /* Prevent division by zero. */
@@ -1209,5 +1218,5 @@
         return 0;
 
-    const double dbBytesPerMs = (pProps->cBytes * pProps->cChannels * pProps->uHz) / RT_NS_1SEC;
+    const double dbBytesPerMs = (PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */) * pProps->uHz) / RT_NS_1SEC;
     Assert(dbBytesPerMs >= 0.0f);
     if (!dbBytesPerMs) /* Prevent division by zero. */
@@ -1231,5 +1240,5 @@
         return 0;
 
-    return cFrames * pProps->cBytes * pProps->cChannels;
+    return cFrames * PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
 }
 
@@ -1288,6 +1297,5 @@
         return 0;
 
-    const uint64_t cbBytesPerSec = pProps->cBytes * pProps->cChannels * pProps->uHz;
-    return ((double)cbBytesPerSec / (double)RT_MS_1SEC) * uMs;
+    return ((double)drvAudioHlpBytesPerSec(pProps) / (double)RT_MS_1SEC) * uMs;
 }
 
@@ -1306,6 +1314,5 @@
         return 0;
 
-    const uint64_t cbBytesPerSec = pProps->cBytes * pProps->cChannels * pProps->uHz;
-    return ((double)cbBytesPerSec / (double)RT_NS_1SEC) * uNs;
+    return ((double)drvAudioHlpBytesPerSec(pProps) / (double)RT_NS_1SEC) * uNs;
 }
 
@@ -1321,5 +1328,5 @@
     AssertPtrReturn(pProps, 0);
 
-    const uint32_t cbFrame = pProps->cBytes * pProps->cChannels;
+    const uint32_t cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
     if (!cbFrame) /* Prevent division by zero. */
         return 0;
@@ -1339,5 +1346,5 @@
     AssertPtrReturn(pProps, 0);
 
-    const uint32_t cbFrame = pProps->cBytes * pProps->cChannels;
+    const uint32_t cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
     if (!cbFrame) /* Prevent division by zero. */
         return 0;
