]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/file.c
macosx: re-implemented time slider to fit the new style
[vlc] / modules / audio_output / file.c
index 79e968508d04f36f869eb06ffbdd121440776c65..8151a0d1512bb167c02a34c0d41b5211a2216bf1 100644 (file)
@@ -34,7 +34,7 @@
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
 #include <vlc_codecs.h> /* WAVEHEADER */
-#include <vlc_charset.h>
+#include <vlc_fs.h>
 
 #define FRAME_SIZE 2048
 #define A52_FRAME_NB 1536
@@ -113,18 +113,17 @@ vlc_module_begin ()
     set_category( CAT_AUDIO )
     set_subcategory( SUBCAT_AUDIO_AOUT )
 
-    add_string( "audiofile-format", "s16", NULL,
+    add_string( "audiofile-format", "s16",
                 FORMAT_TEXT, FORMAT_LONGTEXT, true )
         change_string_list( format_list, 0, 0 )
-    add_integer( "audiofile-channels", 0, NULL,
+    add_integer( "audiofile-channels", 0,
                  CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
-    add_file( "audiofile-file", "audiofile.wav", NULL, FILE_TEXT,
-              FILE_LONGTEXT, false )
-    add_bool( "audiofile-wav", true, NULL, WAV_TEXT, WAV_LONGTEXT, true )
+    add_savefile( "audiofile-file", "audiofile.wav", FILE_TEXT,
+                  FILE_LONGTEXT, false )
+    add_bool( "audiofile-wav", true, WAV_TEXT, WAV_LONGTEXT, true )
 
     set_capability( "audio output", 0 )
-    add_shortcut( "file" )
-    add_shortcut( "audiofile" )
+    add_shortcut( "file", "audiofile" )
     set_callbacks( Open, Close )
 vlc_module_end ()
 
@@ -154,7 +153,7 @@ static int Open( vlc_object_t * p_this )
     if( !strcmp( psz_name, "-" ) )
         p_aout->output.p_sys->p_file = stdout;
     else
-        p_aout->output.p_sys->p_file = utf8_fopen( psz_name, "wb" );
+        p_aout->output.p_sys->p_file = vlc_fopen( psz_name, "wb" );
 
     free( psz_name );
     if ( p_aout->output.p_sys->p_file == NULL )
@@ -221,7 +220,7 @@ static int Open( vlc_object_t * p_this )
         /* Write wave header */
         WAVEHEADER *wh = &p_aout->output.p_sys->waveh;
 
-        memset( wh, 0, sizeof(wh) );
+        memset( wh, 0, sizeof(*wh) );
 
         switch( p_aout->output.output.i_format )
         {
@@ -319,7 +318,7 @@ static void Play( aout_instance_t * p_aout )
 {
     aout_buffer_t * p_buffer;
 
-    p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
+    p_buffer = aout_FifoPop( &p_aout->output.fifo );
 
     if( fwrite( p_buffer->p_buffer, p_buffer->i_buffer, 1,
                 p_aout->output.p_sys->p_file ) != 1 )