[vlc-commits] Make aout "intf-change" a void variable

Rémi Denis-Courmont git at videolan.org
Thu Apr 7 22:21:33 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Apr  7 23:20:06 2011 +0300| [79163765f98f9937131e7461af459b9e3680b943] | committer: Rémi Denis-Courmont

Make aout "intf-change" a void variable

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=79163765f98f9937131e7461af459b9e3680b943
---

 modules/audio_output/alsa.c      |    2 +-
 modules/audio_output/directx.c   |    2 +-
 modules/audio_output/oss.c       |    2 +-
 modules/audio_output/portaudio.c |    2 +-
 modules/audio_output/sdl.c       |    2 +-
 modules/audio_output/waveout.c   |    2 +-
 src/audio_output/common.c        |    3 +--
 src/audio_output/intf.c          |    2 +-
 src/audio_output/output.c        |    2 +-
 9 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/modules/audio_output/alsa.c b/modules/audio_output/alsa.c
index 23ee807..64e6b5d 100644
--- a/modules/audio_output/alsa.c
+++ b/modules/audio_output/alsa.c
@@ -302,7 +302,7 @@ static int Probe( aout_instance_t * p_aout,
 
     /* Add final settings to the variable */
     var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
     return VLC_SUCCESS;
 }
 
diff --git a/modules/audio_output/directx.c b/modules/audio_output/directx.c
index 7e9694d..2897af7 100644
--- a/modules/audio_output/directx.c
+++ b/modules/audio_output/directx.c
@@ -565,7 +565,7 @@ static void Probe( aout_instance_t * p_aout )
     }
 
     var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
 }
 
 /*****************************************************************************
diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index d44ab8a..3d9a535 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -352,7 +352,7 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
 
     /* Reset the DSP device */
     if( ioctl( p_sys->i_fd, SNDCTL_DSP_RESET, NULL ) < 0 )
diff --git a/modules/audio_output/portaudio.c b/modules/audio_output/portaudio.c
index 2c6a0ea..8d98972 100644
--- a/modules/audio_output/portaudio.c
+++ b/modules/audio_output/portaudio.c
@@ -434,7 +434,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
         }
 
         var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
-        var_SetBool( p_aout, "intf-change", true );
+        var_TriggerCallback( p_aout, "intf-change" );
     }
 
     /* Audio format is paFloat32 (always supported by portaudio v19) */
diff --git a/modules/audio_output/sdl.c b/modules/audio_output/sdl.c
index 89bbfb1..a474d24 100644
--- a/modules/audio_output/sdl.c
+++ b/modules/audio_output/sdl.c
@@ -210,7 +210,7 @@ static int Open ( vlc_object_t *p_this )
         var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
     }
 
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
 
     p_aout->output.output.i_rate = obtained.freq;
     p_aout->output.i_nb_samples = obtained.samples;
diff --git a/modules/audio_output/waveout.c b/modules/audio_output/waveout.c
index 287cb02..36b8ae4 100644
--- a/modules/audio_output/waveout.c
+++ b/modules/audio_output/waveout.c
@@ -473,7 +473,7 @@ static void Probe( aout_instance_t * p_aout )
     }
 
     var_AddCallback( p_aout, "audio-device", aout_ChannelsRestart, NULL );
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
 }
 
 /*****************************************************************************
diff --git a/src/audio_output/common.c b/src/audio_output/common.c
index 75f4c91..b073426 100644
--- a/src/audio_output/common.c
+++ b/src/audio_output/common.c
@@ -98,8 +98,7 @@ aout_instance_t * __aout_New( vlc_object_t * p_parent )
     p_aout->output.b_error = 1;
     p_aout->output.b_starving = 1;
 
-    var_Create( p_aout, "intf-change", VLC_VAR_BOOL );
-    var_SetBool( p_aout, "intf-change", true );
+    var_Create( p_aout, "intf-change", VLC_VAR_VOID );
 
     vlc_object_set_destructor( p_aout, aout_Destructor );
 
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 8ff261e..8265d18 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -95,7 +95,7 @@ static int commitVolume (vlc_object_t *obj, aout_instance_t *aout,
         aout_unlock_mixer (aout);
 
         if (ret == 0)
-            var_SetBool (aout, "intf-change", true);
+            var_TriggerCallback (aout, "intf-change");
         aout_unlock_volume (aout);
         vlc_object_release (aout);
     }
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 0642f19..a427467 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -154,7 +154,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
         var_AddCallback( p_aout, "audio-channels", aout_ChannelsRestart,
                          NULL );
     }
-    var_SetBool( p_aout, "intf-change", true );
+    var_TriggerCallback( p_aout, "intf-change" );
 
     aout_FormatPrepare( &p_aout->output.output );
 



More information about the vlc-commits mailing list