* include/codecs.h: ms speakers definitions.
* modules/codec/araw.c: added support for fl64 fourcc.
* codecs.h: codec related structures needed by the demuxers and decoders
*****************************************************************************
* Copyright (C) 1999-2001 VideoLAN
- * $Id: codecs.h,v 1.11 2004/02/14 17:03:33 gbazin Exp $
+ * $Id: codecs.h,v 1.12 2004/02/23 23:01:05 gbazin Exp $
*
* Author: Gildas Bazin <gbazin@netcourrier.com>
*
unsigned int i_id;
} dvb_spuinfo_t;
-/* WAVE form wFormatTag IDs */
-
+/* WAVE format wFormatTag IDs */
#define WAVE_FORMAT_UNKNOWN 0x0000 /* Microsoft Corporation */
#define WAVE_FORMAT_PCM 0x0001 /* Microsoft Corporation */
#define WAVE_FORMAT_ADPCM 0x0002 /* Microsoft Corporation */
#define WAVE_FORMAT_EXTENSIBLE 0xFFFE /* Microsoft */
#endif
+/* Microsoft speaker definitions */
+#define WAVE_SPEAKER_FRONT_LEFT 0x1
+#define WAVE_SPEAKER_FRONT_RIGHT 0x2
+#define WAVE_SPEAKER_FRONT_CENTER 0x4
+#define WAVE_SPEAKER_LOW_FREQUENCY 0x8
+#define WAVE_SPEAKER_BACK_LEFT 0x10
+#define WAVE_SPEAKER_BACK_RIGHT 0x20
+#define WAVE_SPEAKER_FRONT_LEFT_OF_CENTER 0x40
+#define WAVE_SPEAKER_FRONT_RIGHT_OF_CENTER 0x80
+#define WAVE_SPEAKER_BACK_CENTER 0x100
+#define WAVE_SPEAKER_SIDE_LEFT 0x200
+#define WAVE_SPEAKER_SIDE_RIGHT 0x400
+#define WAVE_SPEAKER_TOP_CENTER 0x800
+#define WAVE_SPEAKER_TOP_FRONT_LEFT 0x1000
+#define WAVE_SPEAKER_TOP_FRONT_CENTER 0x2000
+#define WAVE_SPEAKER_TOP_FRONT_RIGHT 0x4000
+#define WAVE_SPEAKER_TOP_BACK_LEFT 0x8000
+#define WAVE_SPEAKER_TOP_BACK_CENTER 0x10000
+#define WAVE_SPEAKER_TOP_BACK_RIGHT 0x20000
+#define WAVE_SPEAKER_RESERVED 0x80000000
+
static struct
{
uint16_t i_tag;
{
{ WAVE_FORMAT_PCM, VLC_FOURCC( 'a', 'r', 'a', 'w' ), "Raw audio" },
{ WAVE_FORMAT_ADPCM, VLC_FOURCC( 'm', 's', 0x00,0x02), "Adpcm" },
- { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'f', 'l', '3', '2' ), "IEEE Float audio" },
+ { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
{ WAVE_FORMAT_ALAW, VLC_FOURCC( 'a', 'l', 'a', 'w' ), "A-Law" },
{ WAVE_FORMAT_MULAW, VLC_FOURCC( 'm', 'l', 'a', 'w' ), "Mu-Law" },
{ WAVE_FORMAT_IMA_ADPCM,VLC_FOURCC( 'm', 's', 0x00,0x11), "Ima-Adpcm" },
* araw.c: Pseudo audio decoder; for raw pcm data
*****************************************************************************
* Copyright (C) 2001, 2003 VideoLAN
- * $Id: araw.c,v 1.29 2004/02/14 17:03:32 gbazin Exp $
+ * $Id: araw.c,v 1.30 2004/02/23 23:01:05 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
{
/* from wav/avi/asf file */
case VLC_FOURCC('a','r','a','w'):
- case VLC_FOURCC('f','l','3','2'):
+ case VLC_FOURCC('a','f','l','t'):
/* _signed_ big endian samples (mov)*/
case VLC_FOURCC('t','w','o','s'):
/* _signed_ little endian samples (mov)*/
p_dec->fmt_in.audio.i_rate, p_dec->fmt_in.audio.i_channels,
p_dec->fmt_in.audio.i_bitspersample );
- if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'f', 'l', '3', '2' ) )
+ if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'f', 'l', 't' ) )
{
switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
{
case 4:
p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
break;
+ case 8:
+ p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','6','4');
+ break;
default:
msg_Err( p_dec, "bad parameters(bits/sample)" );
return VLC_EGENERIC;
* wav.c : wav file input module for vlc
*****************************************************************************
* Copyright (C) 2001-2003 VideoLAN
- * $Id: wav.c,v 1.13 2004/02/14 17:03:32 gbazin Exp $
+ * $Id: wav.c,v 1.14 2004/02/23 23:01:05 gbazin Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
msg_Err( p_input, "invalid 'fmt ' chunk" );
goto error;
}
- stream_Read( p_input->s, NULL, 8 ); /* cannot fail */
+ stream_Read( p_input->s, NULL, 8 ); /* Cannot fail */
/* load waveformatex */
p_wf = (WAVEFORMATEX *)p_wf_ext = malloc( __EVEN( i_size ) + 2 );
/* Handle new WAVE_FORMAT_EXTENSIBLE wav files */
if( GetWLE( &p_wf->wFormatTag ) == WAVE_FORMAT_EXTENSIBLE &&
- i_size >= sizeof( WAVEFORMATEXTENSIBLE ) - 2 )
+ i_size >= sizeof( WAVEFORMATEXTENSIBLE ) )
{
wf_tag_to_fourcc( GetWLE( &p_wf_ext->SubFormat ),
&p_sys->fmt.i_codec, &psz_name );
p_sys->fmt.i_extra );
}
- msg_Dbg( p_input, "format: 0x%4.4x fourcc: %4.4s channels: %d "
- "freq: %d Hz bitrate: %dKo/s blockalign: %d bits/samples: %d "
+ msg_Dbg( p_input, "format: 0x%4.4x, fourcc: %4.4s, channels: %d, "
+ "freq: %d Hz, bitrate: %dKo/s, blockalign: %d, bits/samples: %d, "
"extra size: %d",
GetWLE( &p_wf->wFormatTag ), (char *)&p_sys->fmt.i_codec,
p_sys->fmt.audio.i_channels, p_sys->fmt.audio.i_rate,
switch( p_sys->fmt.i_codec )
{
case VLC_FOURCC( 'a', 'r', 'a', 'w' ):
- case VLC_FOURCC( 'f', 'l', '3', '2' ):
+ case VLC_FOURCC( 'a', 'f', 'l', 't' ):
case VLC_FOURCC( 'u', 'l', 'a', 'w' ):
case VLC_FOURCC( 'a', 'l', 'a', 'w' ):
FrameInfo_PCM( p_input, &p_sys->i_frame_size, &p_sys->i_frame_length );
msg_Err( p_input, "cannot find 'data' chunk" );
goto error;
}
-
+ stream_Read( p_input->s, NULL, 8 ); /* Cannot fail */
p_sys->i_data_pos = stream_Tell( p_input->s );
- stream_Read( p_input->s, NULL, 8 ); /* cannot fail */
-
/* Create one program */
vlc_mutex_lock( &p_input->stream.stream_lock );
if( input_InitStream( p_input, 0 ) == -1)