Index: /trunk/src/VBox/Devices/Audio/DrvAudio.h
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 76878)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.h	(revision 76879)
@@ -189,4 +189,5 @@
 uint32_t DrvAudioHlpBytesToFrames(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
 uint64_t DrvAudioHlpBytesToMilli(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
+uint64_t DrvAudioHlpBytesToMicro(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
 uint64_t DrvAudioHlpBytesToNano(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps);
 uint32_t DrvAudioHlpFramesToBytes(uint32_t cFrames, const PPDMAUDIOPCMPROPS pProps);
Index: /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 76878)
+++ /trunk/src/VBox/Devices/Audio/DrvAudioCommon.cpp	(revision 76879)
@@ -1238,4 +1238,6 @@
  * @param   cbBytes             Amount of bytes to calculate time for.
  * @param   pProps              PCM properties to calculate amount of bytes for.
+ *
+ * @note    Does rounding up the result.
  */
 uint64_t DrvAudioHlpBytesToMilli(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps)
@@ -1243,13 +1245,29 @@
     AssertPtrReturn(pProps, 0);
 
-    if (!cbBytes)
-        return 0;
-
-    const double dbBytesPerMs = (double)drvAudioHlpBytesPerSec(pProps) / (double)RT_MS_1SEC;
-    Assert(dbBytesPerMs >= 0.0f);
-    if (!dbBytesPerMs) /* Prevent division by zero. */
-        return 0;
-
-    return (double)cbBytes / (double)dbBytesPerMs;
+    const unsigned cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
+
+    uint64_t uTimeMs = ((cbBytes + cbFrame - 1) / cbFrame) * RT_MS_1SEC;
+
+    return (uTimeMs + pProps->uHz - 1) / pProps->uHz;
+}
+
+/**
+ * Returns the time (in us) for given byte amount and PCM properties.
+ *
+ * @return  uint64_t            Calculated time (in us).
+ * @param   cbBytes             Amount of bytes to calculate time for.
+ * @param   pProps              PCM properties to calculate amount of bytes for.
+ *
+ * @note    Does rounding up the result.
+ */
+uint64_t DrvAudioHlpBytesToMicro(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps)
+{
+    AssertPtrReturn(pProps, 0);
+
+    const unsigned cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
+
+    uint64_t uTimeUs = ((cbBytes + cbFrame - 1) / cbFrame) * RT_US_1SEC;
+
+    return (uTimeUs + pProps->uHz - 1) / pProps->uHz;
 }
 
@@ -1260,4 +1278,6 @@
  * @param   cbBytes             Amount of bytes to calculate time for.
  * @param   pProps              PCM properties to calculate amount of bytes for.
+ *
+ * @note    Does rounding up the result.
  */
 uint64_t DrvAudioHlpBytesToNano(uint32_t cbBytes, const PPDMAUDIOPCMPROPS pProps)
@@ -1265,13 +1285,9 @@
     AssertPtrReturn(pProps, 0);
 
-    if (!cbBytes)
-        return 0;
-
-    const double dbBytesPerMs = (PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */) * pProps->uHz) / RT_NS_1SEC;
-    Assert(dbBytesPerMs >= 0.0f);
-    if (!dbBytesPerMs) /* Prevent division by zero. */
-        return 0;
-
-    return cbBytes / dbBytesPerMs;
+    const unsigned cbFrame = PDMAUDIOPCMPROPS_F2B(pProps, 1 /* Frame */);
+
+    uint64_t uTimeNs = ((cbBytes + cbFrame - 1) / cbFrame) * RT_NS_1SEC;
+
+    return (uTimeNs + pProps->uHz - 1) / pProps->uHz;
 }
 
