Index: /trunk/src/VBox/Devices/Audio/noaudio.c
===================================================================
--- /trunk/src/VBox/Devices/Audio/noaudio.c	(revision 40718)
+++ /trunk/src/VBox/Devices/Audio/noaudio.c	(revision 40719)
@@ -58,5 +58,12 @@
     ticks_per_second = audio_get_ticks_per_sec ();
     /* Minimize the rounding error: samples = int((ticks * freq) / ticks_per_second + 0.5). */
-    samples = (2 * ticks * hw->info.freq + ticks_per_second) / ticks_per_second / 2;
+    samples = (int)((2 * ticks * hw->info.freq + ticks_per_second) / ticks_per_second / 2);
+    /* Usually there is no integer overflow while calculating the 'samples' value.
+     * It can happen because this is the first invocation or because the function was not called for awhile.
+     * In this case simply claim that all samples has been played.
+     */
+    if (samples < 0) {
+        samples = live;
+    }
 
     no->old_ticks = now;
