]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/directx.c
Use var_Inherit* instead of var_CreateGet*.
[vlc] / modules / audio_output / directx.c
index 3eff7a20d0f2783892272d0bdf48caf5f176c118..9a41a8bd5e15bf3c98d02fa66185d20e9872ea7f 100644 (file)
@@ -130,8 +130,7 @@ vlc_module_begin ()
     set_capability( "audio output", 100 )
     set_category( CAT_AUDIO )
     set_subcategory( SUBCAT_AUDIO_AOUT )
-    add_shortcut( "directx" )
-    add_shortcut( "directsound" )
+    add_shortcut( "directx", "directsound" )
 
     add_string( "directx-audio-device-name", "default", NULL,
              DEVICE_TEXT, DEVICE_LONGTEXT, false )
@@ -553,7 +552,7 @@ static void Probe( aout_instance_t * p_aout )
             text.psz_string = _("A/52 over S/PDIF");
             var_Change( p_aout, "audio-device",
                         VLC_VAR_ADDCHOICE, &val, &text );
-            if( config_GetInt( p_aout, "spdif" ) )
+            if( var_InheritBool( p_aout, "spdif" ) )
                 var_Set( p_aout, "audio-device", val );
         }
     }
@@ -613,7 +612,6 @@ static void CloseAudio( vlc_object_t *p_this )
     /* kill the position notification thread, if any */
     if( p_sys->p_notif )
     {
-        vlc_object_detach( p_sys->p_notif );
         vlc_object_kill( p_sys->p_notif );
         /* wake up the audio thread if needed */
         if( !p_sys->b_playing ) SetEvent( p_sys->p_notif->event );
@@ -702,7 +700,7 @@ static int InitDirectSound( aout_instance_t *p_aout )
                        "DirectSoundEnumerateW" );
     if( OurDirectSoundEnumerate )
     {
-        p_aout->output.p_sys->psz_device = config_GetPsz(p_aout, "directx-audio-device-name");
+        p_aout->output.p_sys->psz_device = var_InheritString(p_aout, "directx-audio-device-name");
         /* Attempt enumeration */
         if( FAILED( OurDirectSoundEnumerate( CallBackDirectSoundEnum,
                                              p_aout ) ) )
@@ -961,7 +959,7 @@ static int FillBuffer( aout_instance_t *p_aout, int i_frame,
                 p_notif->i_frame_size,                    /* Number of bytes */
                 &p_write_position,                  /* Address of lock start */
                 &l_bytes1,       /* Count of bytes locked before wrap around */
-                &p_wrap_around,            /* Buffer adress (if wrap around) */
+                &p_wrap_around,           /* Buffer address (if wrap around) */
                 &l_bytes2,               /* Count of bytes after wrap around */
                 0 );                                                /* Flags */
     if( dsresult == DSERR_BUFFERLOST )