]> git.sesse.net Git - vlc/commitdiff
* ALL: fixed a f*ckage I introduced recently ;) var_Type() now returns 0 when the...
authorGildas Bazin <gbazin@videolan.org>
Tue, 10 Dec 2002 18:22:01 +0000 (18:22 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 10 Dec 2002 18:22:01 +0000 (18:22 +0000)
doesn't exist, but the rest of the code wasn't updated according to this new behaviour.
* modules/audio_output/waveout.c: changed a few error messages into warning messages.

modules/audio_output/oss.c
modules/audio_output/sdl.c
modules/audio_output/waveout.c
src/audio_output/dec.c
src/audio_output/intf.c
src/misc/variables.c

index cc963669b0ac5c5e68288a495c86701cc5e23f96..acef14133d4ae55bef923ccf3793c7a819ca12b3 100644 (file)
@@ -2,7 +2,7 @@
  * oss.c : OSS /dev/dsp module for vlc
  *****************************************************************************
  * Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.37 2002/12/07 23:50:30 massiot Exp $
+ * $Id: oss.c,v 1.38 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -251,7 +251,7 @@ static int Open( vlc_object_t *p_this )
 
     p_aout->output.pf_play = Play;
 
-    if ( var_Type( p_aout, "audio-device" ) < 0 )
+    if ( var_Type( p_aout, "audio-device" ) == 0 )
     {
         Probe( p_aout );
     }
index ee0e5d5fb168362b8530b61decdcaf6b544630d2..1bb43e51db1b62a7a03720f4756c5d02a22a6781 100644 (file)
@@ -2,7 +2,7 @@
  * sdl.c : SDL audio output plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2002 VideoLAN
- * $Id: sdl.c,v 1.17 2002/12/07 23:50:30 massiot Exp $
+ * $Id: sdl.c,v 1.18 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -170,7 +170,7 @@ static int Open ( vlc_object_t *p_this )
                                             AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT :
                                             AOUT_CHAN_CENTER);
 
-        if ( var_Type( p_aout, "audio-device" ) < 0 )
+        if ( var_Type( p_aout, "audio-device" ) == 0 )
         {
             vlc_value_t val;
             var_Create( p_aout, "audio-device", VLC_VAR_STRING | VLC_VAR_HASCHOICE );
@@ -181,7 +181,7 @@ static int Open ( vlc_object_t *p_this )
                              NULL );
         }
     }
-    else if ( var_Type( p_aout, "audio-device" ) < 0 )
+    else if ( var_Type( p_aout, "audio-device" ) == 0 )
     {
         /* First launch. */
         vlc_value_t val;
index 797f7e965838f3efedf5d9d78530a271c3966a26..562fa88ae5da61dda9d46d731dea2a7768f7c694 100644 (file)
@@ -2,7 +2,7 @@
  * waveout.c : Windows waveOut plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: waveout.c,v 1.12 2002/11/20 16:43:33 sam Exp $
+ * $Id: waveout.c,v 1.13 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *      
@@ -130,7 +130,7 @@ static int Open( vlc_object_t *p_this )
     if ( OpenWaveOut( p_aout, WAVE_FORMAT_IEEE_FLOAT, i_nb_channels,
                       p_aout->output.output.i_rate ) )
     {
-        msg_Err( p_aout, "Audio device doesn't allow WAVE_FORMAT_IEEE_FLOAT" );
+        msg_Warn( p_aout, "Audio device can't use WAVE_FORMAT_IEEE_FLOAT" );
 
         p_aout->output.output.i_format = VLC_FOURCC('s','1','6','l');
         if ( OpenWaveOut( p_aout, WAVE_FORMAT_PCM, i_nb_channels,
@@ -257,12 +257,12 @@ static int OpenWaveOut( aout_instance_t *p_aout, int i_format,
                           CALLBACK_FUNCTION );
     if( result == WAVERR_BADFORMAT )
     {
-        msg_Err( p_aout, "waveOutOpen failed WAVERR_BADFORMAT" );
-        return( 1 );
+        msg_Warn( p_aout, "waveOutOpen failed WAVERR_BADFORMAT" );
+        return 1;
     }
     if( result != MMSYSERR_NOERROR )
     {
-        msg_Err( p_aout, "waveOutOpen failed" );
+        msg_Warn( p_aout, "waveOutOpen failed" );
         return 1;
     }
 
index 8a5d9277df20f4169844432c0dd9ac10e1128f9f..2e219415a5f86dad948aa0ffc8c76f78cfb5e0d2 100644 (file)
@@ -2,7 +2,7 @@
  * dec.c : audio output API towards decoders
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: dec.c,v 1.3 2002/12/06 10:10:39 sam Exp $
+ * $Id: dec.c,v 1.4 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -80,11 +80,11 @@ static aout_input_t * DecNew( aout_instance_t * p_aout,
     {
         int i;
 
-        if ( var_Type( p_aout, "audio-device" ) >= 0 )
+        if ( var_Type( p_aout, "audio-device" ) != 0 )
         {
             var_Destroy( p_aout, "audio-device" );
         }
-        if ( var_Type( p_aout, "audio-channels" ) >= 0 )
+        if ( var_Type( p_aout, "audio-channels" ) != 0 )
         {
             var_Destroy( p_aout, "audio-channels" );
         }
index a0249e0fa2f8ee1b7c031d71e855b163ef7847e1..2e4d42164b391a3fef87b953592a02ae76a5125b 100644 (file)
@@ -2,7 +2,7 @@
  * intf.c : audio output API towards the interface modules
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: intf.c,v 1.10 2002/12/07 23:50:30 massiot Exp $
+ * $Id: intf.c,v 1.11 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Christophe Massiot <massiot@via.ecp.fr>
  *
@@ -419,11 +419,11 @@ void aout_FindAndRestart( vlc_object_t * p_this )
 
     if ( p_aout == NULL ) return;
 
-    if ( var_Type( p_aout, "audio-device" ) >= 0 )
+    if ( var_Type( p_aout, "audio-device" ) != 0 )
     {
         var_Destroy( p_aout, "audio-device" );
     }
-    if ( var_Type( p_aout, "audio-channels" ) >= 0 )
+    if ( var_Type( p_aout, "audio-channels" ) != 0 )
     {
         var_Destroy( p_aout, "audio-channels" );
     }
index 77d47292261ac8a6e708e76ff327afcf90c2e169..c789e148ee6b07f62783bbe9a05b4f3e2bb0c178 100644 (file)
@@ -2,7 +2,7 @@
  * variables.c: routines for object variables handling
  *****************************************************************************
  * Copyright (C) 2002 VideoLAN
- * $Id: variables.c,v 1.16 2002/12/08 19:56:04 gbazin Exp $
+ * $Id: variables.c,v 1.17 2002/12/10 18:22:01 gbazin Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *
@@ -414,7 +414,7 @@ int __var_Change( vlc_object_t *p_this, const char *psz_name,
 /*****************************************************************************
  * var_Type: request a variable's type
  *****************************************************************************
- * This function returns the variable type if it exists, or an error if the
+ * This function returns the variable type if it exists, or 0 if the
  * variable could not be found.
  *****************************************************************************/
 int __var_Type( vlc_object_t *p_this, const char *psz_name )