Index: /trunk/include/VBox/err.h
===================================================================
--- /trunk/include/VBox/err.h	(revision 59374)
+++ /trunk/include/VBox/err.h	(revision 59375)
@@ -2701,4 +2701,5 @@
 /** @} */
 
+
 /** @name Main API Status Codes
  * @{
@@ -2712,4 +2713,5 @@
 /** @} */
 
+
 /** @name VBox Drag and Drop Status Codes
  * @{
@@ -2720,4 +2722,14 @@
 
 
+/** @name Audio Status Codes
+ * @{
+ */
+/** Host backend couldn't be initialized.  Happen if the audio server is not
+ *  reachable, audio hardware is not available or similar.  We should use the
+ *  NULL audio driver. */
+#define VERR_AUDIO_BACKEND_INIT_FAILED              (-6600)
+/** @} */
+
+
 /* SED-END */
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 59374)
+++ /trunk/src/VBox/Devices/Audio/DrvHostALSAAudio.cpp	(revision 59375)
@@ -399,5 +399,5 @@
             LogRel(("ALSA: Failed to open \"%s\" as %s: %s\n", pszDev,
                     fIn ? "ADC" : "DAC", snd_strerror(err)));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -410,5 +410,5 @@
             LogRel(("ALSA: Failed to initialize hardware parameters: %s\n",
                     snd_strerror(err)));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -419,5 +419,5 @@
         {
             LogRel(("ALSA: Failed to set access type: %s\n", snd_strerror(err)));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -428,5 +428,5 @@
             LogRel(("ALSA: Failed to set audio format to %d: %s\n",
                     pCfgReq->fmt, snd_strerror(err)));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -437,5 +437,5 @@
             LogRel(("ALSA: Failed to set frequency to %dHz: %s\n",
                     pCfgReq->freq, snd_strerror(err)));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -445,5 +445,5 @@
         {
             LogRel(("ALSA: Failed to set number of channels to %d\n", pCfgReq->nchannels));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -453,5 +453,5 @@
         {
             LogRel(("ALSA: Number of audio channels (%u) not supported\n", cChannels));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -482,5 +482,5 @@
                     {
                         LogRel(("ALSA: Failed to set period time %d\n", pCfgReq->period_size));
-                        rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                         break;
                     }
@@ -492,5 +492,5 @@
                 {
                     LogRel(("ALSA: Failed to set buffer time %d\n", pCfgReq->buffer_size));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                     break;
                 }
@@ -513,5 +513,5 @@
                     {
                         LogRel(("ALSA: Could not determine minimal period size\n"));
-                        rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                         break;
                     }
@@ -539,5 +539,5 @@
                         LogRel(("ALSA: Failed to set period size %d (%s)\n",
                                 period_size_f, snd_strerror(err)));
-                        rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                        rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                         break;
                     }
@@ -553,5 +553,5 @@
                 {
                     LogRel(("ALSA: Could not retrieve minimal buffer size\n"));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                     break;
                 }
@@ -579,5 +579,5 @@
                     LogRel(("ALSA: Failed to set buffer size %d: %s\n",
                             buffer_size_f, snd_strerror(err)));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                     break;
                 }
@@ -591,5 +591,5 @@
         {
             LogRel(("ALSA: Failed to apply audio parameters\n"));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -599,5 +599,5 @@
         {
             LogRel(("ALSA: Failed to get buffer size\n"));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -609,5 +609,5 @@
         {
             LogRel(("ALSA: Failed to get period size\n"));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -620,5 +620,5 @@
         {
             LogRel(("ALSA: Could not prepare hPCM %p\n", (void *)phPCM));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -876,5 +876,6 @@
                 default:
                     LogFunc(("Failed to read input frames: %s\n", snd_strerror(cRead)));
-                    rc = VERR_GENERAL_FAILURE; /** @todo Fudge! */
+                    rc = VERR_AUDIO_BACKEND_INIT_FAILED;
+                    VERR_GENERAL_FAILURE; /** @todo Fudge! */
                     break;
             }
Index: /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 59374)
+++ /trunk/src/VBox/Devices/Audio/DrvHostCoreAudio.cpp	(revision 59375)
@@ -750,5 +750,5 @@
     {
         LogRel(("CoreAudio: Failed to determine frame buffer size of the audio input device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -758,5 +758,5 @@
     {
         LogRel(("CoreAudio: Failed to set frame buffer size for the audio input device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -772,5 +772,5 @@
     {
         LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -780,5 +780,5 @@
     {
         LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -790,5 +790,5 @@
     {
         LogRel(("CoreAudio: Failed to disable input I/O mode for input stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -800,5 +800,5 @@
     {
         LogRel(("CoreAudio: Failed to disable output I/O mode for input stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -809,5 +809,5 @@
     {
         LogRel(("CoreAudio: Failed to set current device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -826,5 +826,5 @@
     {
         LogRel(("CoreAudio: Failed to register input callback (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -836,5 +836,5 @@
     {
         LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -857,5 +857,5 @@
             LogRel(("CoreAudio: Failed to create the audio converte(%RI32). Input Format=%d, Output Foramt=%d\n",
                      err, pStreamIn->deviceFormat, pStreamIn->streamFormat));
-            return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+            return VERR_AUDIO_BACKEND_INIT_FAILED;
         }
 
@@ -876,5 +876,5 @@
             {
                 LogRel(("CoreAudio: Failed to set channel mapping for the audio input converter (%RI32)\n", err));
-                return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+                return VERR_AUDIO_BACKEND_INIT_FAILED;
             }
         }
@@ -886,5 +886,5 @@
         {
             LogRel(("CoreAudio: Failed to set input format for input stream (%RI32)\n", err));
-            return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+            return VERR_AUDIO_BACKEND_INIT_FAILED;
         }
 #if 0
@@ -905,5 +905,5 @@
     {
         LogRel(("CoreAudio: Failed to set output format for input stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -917,5 +917,5 @@
     if (err != noErr)    {
         LogRel(("CoreAudio: Failed to set maximum frame buffer size for input stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -925,5 +925,5 @@
     {
         LogRel(("CoreAudio: Failed to initialize audio unit for input stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -934,5 +934,5 @@
     {
         LogRel(("CoreAudio: Failed to get input device format (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -948,5 +948,5 @@
     {
         LogRel(("CoreAudio: Failed to get maximum frame buffer size from input audio device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1095,5 +1095,5 @@
     {
         LogRel(("CoreAudio: Failed to determine frame buffer size of the audio output device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1103,5 +1103,5 @@
     {
         LogRel(("CoreAudio: Failed to set frame buffer size for the audio output device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1117,5 +1117,5 @@
     {
         LogRel(("CoreAudio: Failed to find HAL output component\n")); /** @todo Return error value? */
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1125,5 +1125,5 @@
     {
         LogRel(("CoreAudio: Failed to open output component (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1135,5 +1135,5 @@
     {
         LogRel(("CoreAudio: Failed to disable I/O mode for output stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1144,5 +1144,5 @@
     {
         LogRel(("CoreAudio: Failed to set current device for output stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1161,5 +1161,5 @@
     {
         LogRel(("CoreAudio: Failed to register output callback (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1171,5 +1171,5 @@
     {
         LogRel(("CoreAudio: Failed to get device format (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1188,5 +1188,5 @@
     {
         LogRel(("CoreAudio: Failed to set stream format for output stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1197,5 +1197,5 @@
     {
         LogRel(("CoreAudio: Failed to retrieve device format for output stream (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1210,5 +1210,5 @@
     {
         LogRel(("CoreAudio: Failed to set maximum frame buffer size for output AudioUnit (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1218,5 +1218,5 @@
     {
         LogRel(("CoreAudio: Failed to initialize the output audio device (%RI32)\n", err));
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
@@ -1234,5 +1234,5 @@
 
         AudioUnitUninitialize(pStreamOut->audioUnit);
-        return VERR_GENERAL_FAILURE; /** @todo Fudge! */
+        return VERR_AUDIO_BACKEND_INIT_FAILED;
     }
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp	(revision 59374)
+++ /trunk/src/VBox/Devices/Audio/DrvHostPulseAudio.cpp	(revision 59375)
@@ -380,5 +380,5 @@
                 LogRel(("PulseAudio: Could not connect input stream \"%s\": %s\n",
                         pszName, pa_strerror(pa_context_errno(g_pContext))));
-                rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                 break;
             }
@@ -394,5 +394,5 @@
                 LogRel(("PulseAudio: Could not connect playback stream \"%s\": %s\n",
                         pszName, pa_strerror(pa_context_errno(g_pContext))));
-                rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                 break;
             }
@@ -414,5 +414,5 @@
                 LogRel(("PulseAudio: Failed to initialize stream \"%s\" (state %ld)\n",
                         pszName, sstate));
-                rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                 break;
             }
@@ -491,5 +491,5 @@
             LogRel(("PulseAudio: Failed to start threaded mainloop: %s\n",
                      pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -505,5 +505,5 @@
             LogRel(("PulseAudio: Failed to connect to server: %s\n",
                      pa_strerror(pa_context_errno(g_pContext))));
-            rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+            rc = VERR_AUDIO_BACKEND_INIT_FAILED;
             break;
         }
@@ -523,5 +523,5 @@
             {
                 LogRel(("PulseAudio: Failed to initialize context (state %d)\n", cstate));
-                rc = VERR_GENERAL_FAILURE; /** @todo Find a better rc. */
+                rc = VERR_AUDIO_BACKEND_INIT_FAILED;
                 break;
             }
