]> git.sesse.net Git - vlc/blobdiff - modules/audio_output/file.c
ALSA: report errors when, and simplify enumerating devices
[vlc] / modules / audio_output / file.c
index cb9bc0c8897ab001d86caf46a1f60439f4d86e13..79e968508d04f36f869eb06ffbdd121440776c65 100644 (file)
@@ -30,8 +30,6 @@
 # include "config.h"
 #endif
 
-#include <errno.h>
-
 #include <vlc_common.h>
 #include <vlc_plugin.h>
 #include <vlc_aout.h>
@@ -122,7 +120,7 @@ vlc_module_begin ()
                  CHANNELS_TEXT, CHANNELS_LONGTEXT, true )
     add_file( "audiofile-file", "audiofile.wav", NULL, FILE_TEXT,
               FILE_LONGTEXT, false )
-    add_bool( "audiofile-wav", 1, NULL, WAV_TEXT, WAV_LONGTEXT, true )
+    add_bool( "audiofile-wav", true, NULL, WAV_TEXT, WAV_LONGTEXT, true )
 
     set_capability( "audio output", 0 )
     add_shortcut( "file" )
@@ -323,7 +321,7 @@ static void Play( aout_instance_t * p_aout )
 
     p_buffer = aout_FifoPop( p_aout, &p_aout->output.fifo );
 
-    if( fwrite( p_buffer->p_buffer, p_buffer->i_nb_bytes, 1,
+    if( fwrite( p_buffer->p_buffer, p_buffer->i_buffer, 1,
                 p_aout->output.p_sys->p_file ) != 1 )
     {
         msg_Err( p_aout, "write error (%m)" );
@@ -332,7 +330,7 @@ static void Play( aout_instance_t * p_aout )
     if( p_aout->output.p_sys->b_add_wav_header )
     {
         /* Update Wave Header */
-        p_aout->output.p_sys->waveh.DataLength += p_buffer->i_nb_bytes;
+        p_aout->output.p_sys->waveh.DataLength += p_buffer->i_buffer;
     }
 
     aout_BufferFree( p_buffer );