* Fixed an endianness issue in S/PDIF.
* Added a walken optimization of float32tos16.
* a52tospdif.c : encapsulates A/52 frames into S/PDIF packets
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: a52tospdif.c,v 1.2 2002/08/11 23:26:28 massiot Exp $
+ * $Id: a52tospdif.c,v 1.3 2002/08/12 22:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
* Stéphane Borel <stef@via.ecp.fr>
static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
aout_buffer_t * p_in_buf, aout_buffer_t * p_out_buf )
{
+#ifdef WORDS_BIGENDIAN
+ static const u8 p_sync[6] = { 0xF8, 0x72, 0x4E, 0x1F, 0x00, 0x01 };
+#else
static const u8 p_sync[6] = { 0x72, 0xF8, 0x1F, 0x4E, 0x01, 0x00 };
+#endif
u16 i_length = p_in_buf->i_nb_samples;
u16 * pi_length;
byte_t * p_in = p_in_buf->p_buffer;
* float32tos16.c : converter from float32 to signed 16 bits integer
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: float32tos16.c,v 1.2 2002/08/09 23:47:22 massiot Exp $
+ * $Id: float32tos16.c,v 1.3 2002/08/12 22:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
for ( i = 0; i < p_in_buf->i_nb_samples * p_filter->input.i_channels; i++ )
{
+#if 0
+ /* Slow version */
if ( *p_in >= 1.0 ) *p_out = 32767;
else if ( *p_in < -1.0 ) *p_out = -32768;
else *p_out = *p_in * 32768.0;
+#else
+ /* This is walken's trick based on IEEE float format. */
+ s32 * p_value = (s32 *)p_in;
+ *p_in += 384.0;
+ if ( *p_value > 0x43c07fff ) *p_out = 32767;
+ else if ( *p_value < 0x43bf8000 ) *p_out = -32768;
+ else *p_out = *p_value - 0x43c00000;
+#endif
p_in++; p_out++;
}
* ps.c : Program Stream input module for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: ps.c,v 1.3 2002/08/12 22:30:07 sigmunau Exp $
+ * $Id: ps.c,v 1.4 2002/08/12 22:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
*****************************************************************************/
vlc_module_begin();
set_description( _("ISO 13818-1 MPEG Program Stream input") );
- set_capability( "demux", 0 );
+ set_capability( "demux", 1 );
set_callbacks( Activate, Deactivate );
add_shortcut( "ps" );
vlc_module_end();
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout.m,v 1.2 2002/08/07 21:36:56 massiot Exp $
+ * $Id: aout.m,v 1.3 2002/08/12 22:48:18 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
msg_Dbg( p_aout, "toto : %d", p_sys->i_buffer_size );
#else
p_sys->i_buffer_size = sizeof(float) * p_aout->output.output.i_channels
- * 1536;
+ * 4096;
err = AudioDeviceSetProperty( p_sys->device, 0, 0, false,
kAudioDevicePropertyBufferSize,
i_param_size, &p_sys->i_buffer_size );
* stream_output.c : stream output module
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: stream_output.c,v 1.1 2002/08/12 22:12:51 massiot Exp $
+ * $Id: stream_output.c,v 1.2 2002/08/12 22:48:18 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
module_Unneed( p_sout, p_sout->p_access );
return -1;
}
+
+ return 0;
}