*****************************************************************************/
static int Open ( vlc_object_t * );
static void Play ( audio_output_t *, block_t * );
+static void Flush ( audio_output_t *, bool );
/*****************************************************************************
* Module descriptor
#define WAV_LONGTEXT N_("Instead of writing a raw file, you can add a WAV " \
"header to the file.")
-static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le",
- "s16_le", "u16_be", "s16_be",
- "float32", "spdif" };
-static const int format_int[] = { VLC_CODEC_U8,
- VLC_CODEC_S8,
- VLC_CODEC_U16N, VLC_CODEC_S16N,
- VLC_CODEC_U16L,
- VLC_CODEC_S16L,
- VLC_CODEC_U16B,
- VLC_CODEC_S16B,
- VLC_CODEC_F32L,
- VLC_CODEC_SPDIFL };
+static const char *const format_list[] = {
+ "u8", "s16",
+#ifndef WORDS_BIGENDIAN
+ "float32",
+#endif
+ "spdif",
+};
+static const int format_int[] = {
+ VLC_CODEC_U8, VLC_CODEC_S16N,
+#ifndef WORDS_BIGENDIAN
+ VLC_CODEC_FL32,
+#endif
+ VLC_CODEC_SPDIFL,
+};
#define FILE_TEXT N_("Output file")
#define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout")
p_aout->time_get = NULL;
p_aout->play = Play;
p_aout->pause = NULL;
- p_aout->flush = NULL;
+ p_aout->flush = Flush;
/* Audio format */
psz_format = var_InheritString( p_aout, "audiofile-format" );
switch( fmt->i_format )
{
- case VLC_CODEC_F32L:
+#ifndef WORDS_BIGENDIAN
+ case VLC_CODEC_FL32:
wh->Format = WAVE_FORMAT_IEEE_FLOAT;
wh->BitsPerSample = sizeof(float) * 8;
break;
+#endif
case VLC_CODEC_U8:
wh->Format = WAVE_FORMAT_PCM;
wh->BitsPerSample = 8;
break;
- case VLC_CODEC_S16L:
default:
wh->Format = WAVE_FORMAT_PCM;
wh->BitsPerSample = 16;
block_Release( p_buffer );
}
+static void Flush( audio_output_t *aout, bool wait )
+{
+ if( fflush( aout->sys->p_file ) )
+ msg_Err( aout, "flush error (%m)" );
+ (void) wait;
+}
+
static int Open(vlc_object_t *obj)
{
audio_output_t *aout = (audio_output_t *)obj;