Index: /trunk/src/VBox/Devices/Audio/DrvAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 64966)
+++ /trunk/src/VBox/Devices/Audio/DrvAudio.cpp	(revision 64967)
@@ -137,4 +137,57 @@
 # endif /* unused */
 
+#ifdef LOG_ENABLED
+/**
+ * Converts an audio stream status to a string.
+ *
+ * @returns Stringified stream status flags. Must be free'd with RTStrFree().
+ *          "NONE" if no flags set.
+ * @param   fFlags              Stream status flags to convert.
+ */
+char *dbgAudioStreamStatusToStr(PDMAUDIOSTRMSTS fStatus)
+{
+#define APPEND_FLAG_TO_STR(_aFlag)              \
+    if (fStatus & PDMAUDIOSTRMSTS_FLAG_##_aFlag) \
+    {                                            \
+        if (pszFlags)                            \
+        {                                        \
+            rc2 = RTStrAAppend(&pszFlags, " ");  \
+            if (RT_FAILURE(rc2))                 \
+                break;                           \
+        }                                        \
+                                                 \
+        rc2 = RTStrAAppend(&pszFlags, #_aFlag);  \
+        if (RT_FAILURE(rc2))                     \
+            break;                               \
+    }                                            \
+
+    char *pszFlags = NULL;
+    int rc2 = VINF_SUCCESS;
+
+    do
+    {
+        APPEND_FLAG_TO_STR(NONE           );
+        APPEND_FLAG_TO_STR(INITIALIZED    );
+        APPEND_FLAG_TO_STR(ENABLED        );
+        APPEND_FLAG_TO_STR(PAUSED         );
+        APPEND_FLAG_TO_STR(PENDING_DISABLE);
+        APPEND_FLAG_TO_STR(DATA_READABLE  );
+        APPEND_FLAG_TO_STR(DATA_WRITABLE  );
+        APPEND_FLAG_TO_STR(PENDING_REINIT );
+    } while (0);
+
+    if (   RT_FAILURE(rc2)
+        && pszFlags)
+    {
+        RTStrFree(pszFlags);
+        pszFlags = NULL;
+    }
+
+#undef APPEND_FLAG_TO_STR
+
+    return pszFlags;
+}
+#endif /* LOG_ENABLED */
+
 /**
  * Returns the host stream part of an audio stream pair, or NULL
@@ -311,5 +364,11 @@
     AssertPtr(pGstStream);
 
-    LogFlowFunc(("Status host=0x%x, guest=0x%x\n", pHstStream->fStatus, pGstStream->fStatus));
+#ifdef LOG_ENABLED
+    char *pszHstFlags = dbgAudioStreamStatusToStr(pHstStream->fStatus);
+    char *pszGstFlags = dbgAudioStreamStatusToStr(pHstStream->fStatus);
+    LogFlowFunc(("Status host=%s, guest=%s\n", pszHstFlags, pszGstFlags));
+    RTStrFree(pszGstFlags);
+    RTStrFree(pszHstFlags);
+#endif /* LOG_ENABLED */
 
     int rc = VINF_SUCCESS;
@@ -421,5 +480,9 @@
         return VERR_NOT_FOUND;
 
-    LogFlowFunc(("[%s] enmStreamCmd=%RU32, fStatus=0x%x\n", pHstStream->szName, enmStreamCmd, pHstStream->fStatus));
+#ifdef LOG_ENABLED
+    char *pszHstFlags = dbgAudioStreamStatusToStr(pHstStream->fStatus);
+    LogFlowFunc(("[%s] enmStreamCmd=%RU32, fStatus=%s\n", pHstStream->szName, enmStreamCmd, pszHstFlags));
+    RTStrFree(pszHstFlags);
+#endif /* LOG_ENABLED */
 
     AssertPtr(pThis->pHostDrvAudio);
@@ -993,5 +1056,9 @@
     }
 
-    Log3Func(("[%s] fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus));
+#ifdef LOG_ENABLED
+    char *pszHstFlags = dbgAudioStreamStatusToStr(pHstStream->fStatus);
+    Log3Func(("[%s] fStatus=%s\n", pHstStream->szName, pszHstFlags));
+    RTStrFree(pszHstFlags);
+#endif /* LOG_ENABLED */
 
     /* Not enabled or paused? Skip iteration. */
@@ -1274,10 +1341,12 @@
                     STAM_COUNTER_ADD(&pHstStream->In.StatSamplesCaptured, cSamplesCaptured);
 #endif
+                    Log3Func(("[%s] %RU32 samples captured\n", pHstStream->szName, cSamplesCaptured));
                 }
             }
-        }
-
-        Log3Func(("[%s] stsBackend=0x%x, cSamplesLive=%RU32, cSamplesCaptured=%RU32, rc=%Rrc\n",
-                  pHstStream->szName, stsBackend, cSamplesLive, cSamplesCaptured, rc));
+            else
+                Log3Func(("[%s] Skipping (backend status 0x%x)\n", pHstStream->szName, stsBackend));
+        }
+        else
+            Log3Func(("[%s] Skipping (still has %RU32 live samples)\n", pHstStream->szName, cSamplesLive));
 
     } while (0);
@@ -1288,4 +1357,6 @@
             *pcSamplesCaptured = cSamplesCaptured;
     }
+    else
+        LogFunc(("[%s] Failed with %Rrc\n", rc));
 
     int rc2 = RTCritSectLeave(&pThis->CritSect);
@@ -2365,5 +2436,9 @@
     int rc = VINF_SUCCESS;
 
-    LogFlowFunc(("%s: fStatus=0x%x\n", pHstStream->szName, pHstStream->fStatus));
+#ifdef LOG_ENABLED
+    char *pszHstFlags = dbgAudioStreamStatusToStr(pHstStream->fStatus);
+    LogFunc(("%s: fStatus=%s\n", pHstStream->szName, pszHstFlags));
+    RTStrFree(pszHstFlags);
+#endif /* LOG_ENABLED */
 
     if (pHstStream->fStatus & PDMAUDIOSTRMSTS_FLAG_INITIALIZED)
