# include "config.h"
#endif
-#include <errno.h>
-
#include <vlc_common.h>
#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
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" )
- add_shortcut( "audiofile" )
+ add_shortcut( "file", "audiofile" )
set_callbacks( Open, Close )
vlc_module_end ()
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 )
/* 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 )
{
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)" );
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 );