]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/auhal.c
* browsed through all code files starting with A to F and added non-blocking intf_Use...
[vlc] / modules / audio_output / auhal.c
index d049c361cc918acaa358b439be82f61286b647e1..80cd622fb4abefae42c5fdb9633098b1b0f097a6 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <vlc/vlc.h>
 #include <vlc/aout.h>
+#include <vlc_interaction.h>
 
 #include "aout_internal.h"
 
@@ -240,6 +241,9 @@ static int Open( vlc_object_t * p_this )
     if( p_sys->i_hog_pid != -1 && p_sys->i_hog_pid != getpid() )
     {
         msg_Err( p_aout, "Selected audio device is exclusively in use by another program." );
+        intf_UserFatal( p_aout, VLC_FALSE, _("Audio output failed"), 
+                        _("The selected audio output device is exclusively in "
+                          "use by another program.") );
         goto error;
     }
 
@@ -415,13 +419,17 @@ static int OpenAnalog( aout_instance_t *p_aout )
                         p_aout->output.output.i_physical_channels |= AOUT_CHAN_REARCENTER;
                         continue;
                     default:
-                        msg_Warn( p_aout, "Unrecognized channel form provided by driver: %d", (int)layout->mChannelDescriptions[i].mChannelLabel );
+                        msg_Warn( p_aout, "unrecognized channel form provided by driver: %d", (int)layout->mChannelDescriptions[i].mChannelLabel );
                 }
             }
             if( p_aout->output.output.i_physical_channels == 0 )
             {
                 p_aout->output.output.i_physical_channels = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
                 msg_Err( p_aout, "You should configure your speaker layout with Audio Midi Setup Utility in /Applications/Utilities. Now using Stereo mode." );
+                intf_UserFatal( p_aout, VLC_FALSE, _("Audio device is not configured"), 
+                                _("You should configure your speaker layout with "
+                                  "the \"Audio Midi Setup Utility\" in /Applications/"
+                                  "Utilities. Stereo mode is being used now.") );
             }
         }
         if( layout ) free( layout );
@@ -637,7 +645,7 @@ static int OpenSPDIF( aout_instance_t * p_aout )
     p_streams = (AudioStreamID *)malloc( i_param_size );
     if( p_streams == NULL )
     {
-        msg_Err( p_aout, "Out of memory" );
+        msg_Err( p_aout, "out of memory" );
         return VLC_FALSE;
     }
     
@@ -1012,7 +1020,7 @@ static void Probe( aout_instance_t * p_aout )
             var_Change( p_aout, "audio-device", VLC_VAR_ADDCHOICE, &val, &text );
             if( p_sys->i_default_dev == p_devices[i] && config_GetInt( p_aout, "spdif" ) )
             {
-                /* I we selected to prefer SPDIF output if available
+                /* We selected to prefer SPDIF output if available
                  * then this "dummy" entry should be selected */
                 var_Change( p_aout, "audio-device", VLC_VAR_SETDEFAULT, &val, NULL );
                 var_Set( p_aout, "audio-device", val );
@@ -1088,7 +1096,7 @@ static int AudioDeviceSupportsDigital( aout_instance_t *p_aout, AudioDeviceID i_
     p_streams = (AudioStreamID *)malloc( i_param_size );
     if( p_streams == NULL )
     {
-        msg_Err( p_aout, "Out of memory" );
+        msg_Err( p_aout, "out of memory" );
         return VLC_ENOMEM;
     }