* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.27 2002/09/30 21:32:32 massiot Exp $
+ * $Id: oss.c,v 1.28 2002/10/01 22:34:43 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
/* Set the output format */
if ( p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i') )
{
- i_format = VLC_FOURCC('s','p','d','i');
+ i_format = AFMT_AC3;
p_aout->output.i_nb_samples = A52_FRAME_NB;
p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->output.output.i_frame_length = A52_FRAME_NB;
}
else
{
- p_aout->output.output.i_format = i_format = AOUT_FMT_S16_NE;
+ p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+ i_format = AFMT_S16_NE;
p_aout->output.i_nb_samples = FRAME_SIZE;
aout_VolumeSoftInit( p_aout );
if( ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0
|| i_format != p_aout->output.output.i_format )
{
- if ( i_format == VLC_FOURCC('s','p','d','i') )
+ if ( i_format == AFMT_AC3 )
{
/* Retry with S16 */
msg_Warn( p_aout, "cannot set audio output format (%i)", i_format );
- p_aout->output.output.i_format = i_format = AOUT_FMT_S16_NE;
+ p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+ i_format = AFMT_S16_NE;
p_aout->output.i_nb_samples = FRAME_SIZE;
if( ioctl( p_sys->i_fd, SNDCTL_DSP_SETFMT, &i_format ) < 0
|| i_format != p_aout->output.output.i_format )