the latest aout3 changes.
* alsa.c : alsa plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2001 VideoLAN
- * $Id: alsa.c,v 1.5 2002/08/19 21:31:11 massiot Exp $
+ * $Id: alsa.c,v 1.6 2002/08/19 23:07:30 sam Exp $
*
* Authors: Henri Fallon <henri@videolan.org> - Original Author
* Jeffrey Baker <jwbaker@acm.org> - Port to ALSA 1.0 API
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- add_category_hint( N_("Audio"), NULL );
- add_string( "alsa-device", NULL, NULL, N_("Name"), NULL );
+ add_category_hint( N_("ALSA"), NULL );
+ add_string( "alsa-device", NULL, NULL, N_("device name"), NULL );
set_description( _("ALSA audio module") );
set_capability( "audio output", 50 );
set_callbacks( Open, Close );
p_sys->b_can_sleek = VLC_TRUE;
i_format = SND_PCM_FORMAT_S16_LE;
i_channels = 2;
- p_aout->output.output.i_bytes_per_sec =
- p_aout->output.output.i_rate * AOUT_SPDIF_SIZE /
- ALSA_SPDIF_PERIOD_SIZE;
+ p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
+ p_aout->output.output.i_frame_length = ALSA_SPDIF_PERIOD_SIZE;
break;
case AOUT_FMT_FIXED32:
default:
/*****************************************************************************
* Play: queue a buffer for playing by aRtsThread
*****************************************************************************/
-static void Play( aout_instance_t *p_aout );
+static void Play( aout_instance_t *p_aout )
{
+ ;
}
/*****************************************************************************
}
else
{
- i_size = aout_FormatToByterate( &p_aout->output.output )
- * p_sys->i_size
- / p_aout->output.output.i_rate;
+ i_size = p_sys->i_size / p_aout->output.output.i_frame_length
+ * p_aout->output.output.i_bytes_per_frame;
p_bytes = alloca( i_size );
memset( p_bytes, 0, i_size );
}
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: esd.c,v 1.7 2002/08/19 21:31:11 massiot Exp $
+ * $Id: esd.c,v 1.8 2002/08/19 23:07:30 sam Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
* number of buffered samples, so I assume ESD_BUF_SIZE/2 */
p_sys->latency =
(mtime_t)( esd_get_latency( esd_open_sound(NULL) ) + ESD_BUF_SIZE/2
- * aout_FormatToByterate( &p_aout->output.output )
+ * p_aout->output.output.i_bytes_per_frame
+ * p_aout->output.output.i_rate
+ / p_aout->output.output.i_frame_length
/ ESD_DEFAULT_RATE )
* (mtime_t)1000000
- / (mtime_t)aout_FormatToByterate( &p_aout->output.output );
+ / p_aout->output.output.i_bytes_per_frame
+ / p_aout->output.output.i_rate
+ * p_aout->output.output.i_frame_length;
p_sys->b_initialized = VLC_TRUE;
}
else
{
- i_size = aout_FormatToByterate( &p_aout->output.output )
- * ESD_BUF_SIZE * 2
- / p_aout->output.output.i_rate;
+ i_size = ESD_BUF_SIZE * 2
+ / p_aout->output.output.i_frame_length
+ * p_aout->output.output.i_bytes_per_frame;
p_bytes = alloca( i_size );
memset( p_bytes, 0, i_size );
}
* file.c : audio output which writes the samples to a file
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: file.c,v 1.6 2002/08/19 21:31:11 massiot Exp $
+ * $Id: file.c,v 1.7 2002/08/19 23:07:30 sam Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
/*****************************************************************************
* Module descriptor
*****************************************************************************/
-#define FORMAT_TEXT N_("Output format")
+#define FORMAT_TEXT N_("output format")
#define FORMAT_LONGTEXT N_("one of \"u8\", \"s8\", \"u16\", \"s16\"," \
" \"u16_le\", \"s16_le\", \"u16_be\"," \
" \"s16_be\", \"fixed32\", \"float32\" or \"spdif\"")
AOUT_FMT_U16_BE, AOUT_FMT_S16_BE, AOUT_FMT_FIXED32,
AOUT_FMT_FLOAT32, AOUT_FMT_SPDIF };
-#define PATH_TEXT N_("Path of the output file")
+#define PATH_TEXT N_("path of the output file")
#define PATH_LONGTEXT N_("By default samples.raw")
vlc_module_begin();
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.11 2002/08/19 21:31:11 massiot Exp $
+ * $Id: oss.c,v 1.12 2002/08/19 23:07:30 sam Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
* Module descriptor
*****************************************************************************/
vlc_module_begin();
- add_category_hint( N_("Audio"), NULL );
+ add_category_hint( N_("OSS"), NULL );
add_file( "dspdev", "/dev/dsp", NULL, N_("OSS dsp device"), NULL );
set_description( _("Linux OSS /dev/dsp module") );
set_capability( "audio output", 100 );
if( vlc_thread_create( p_aout, "aout", OSSThread, VLC_FALSE ) )
{
msg_Err( p_aout, "cannot create OSS thread (%s)", strerror(errno) );
+ close( p_sys->i_fd );
free( psz_device );
free( p_sys );
return -1;
* Order is important here, since GetBufInfo is believed to take
* more time than mdate(). */
next_date = (mtime_t)GetBufInfo( p_aout ) * 1000000
- / aout_FormatToByterate( &p_aout->output.output );
+ / p_aout->output.output.i_bytes_per_frame
+ / p_aout->output.output.i_rate
+ * p_aout->output.output.i_frame_length;
next_date += mdate();
- p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0 );
+ p_buffer = aout_OutputNextBuffer( p_aout, next_date, VLC_FALSE );
}
else
{
- p_buffer = aout_OutputNextBuffer( p_aout, 0, 1 );
+ p_buffer = aout_OutputNextBuffer( p_aout, 0, VLC_TRUE );
}
if ( p_buffer != NULL )
}
else
{
- i_size = aout_FormatToByterate( &p_aout->output.output )
- * FRAME_SIZE
- / p_aout->output.output.i_rate;
+ i_size = FRAME_SIZE / p_aout->output.output.i_frame_length
+ * p_aout->output.output.i_bytes_per_frame;
p_bytes = alloca( i_size );
memset( p_bytes, 0, i_size );
}