* aout_internal.h : internal defines for audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout_internal.h,v 1.4 2002/08/14 00:23:59 massiot Exp $
+ * $Id: aout_internal.h,v 1.5 2002/08/14 00:43:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
audio_sample_format_t * p_format );
void aout_OutputPlay( aout_instance_t * p_aout, aout_buffer_t * p_buffer );
void aout_OutputDelete( aout_instance_t * p_aout );
+VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t, vlc_bool_t ) );
* audio_output.h : audio output interface
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: audio_output.h,v 1.58 2002/08/14 00:23:59 massiot Exp $
+ * $Id: audio_output.h,v 1.59 2002/08/14 00:43:51 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
VLC_EXPORT( aout_input_t *, __aout_InputNew, ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) );
VLC_EXPORT( void, aout_InputDelete, ( aout_instance_t *, aout_input_t * ) );
-/* From output.c : */
-VLC_EXPORT( aout_buffer_t *, aout_OutputNextBuffer, ( aout_instance_t *, mtime_t ) );
-
struct module_symbols_t
{
aout_buffer_t * (* aout_BufferNew_inner) ( aout_instance_t *, aout_input_t *, size_t ) ;
- aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t ) ;
+ aout_buffer_t * (* aout_OutputNextBuffer_inner) ( aout_instance_t *, mtime_t, vlc_bool_t ) ;
aout_input_t * (* __aout_InputNew_inner) ( vlc_object_t *, aout_instance_t **, audio_sample_format_t * ) ;
aout_instance_t * (* __aout_NewInstance_inner) ( vlc_object_t * ) ;
char * (* __config_GetPsz_inner) (vlc_object_t *, const char *) ;
/* Get the presentation date of the next write() operation. It
* is equal to the current date + latency */
- p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency );
+ p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency, 0 );
if ( p_buffer != NULL )
{
* esd.c : EsounD module
*****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN
- * $Id: esd.c,v 1.4 2002/08/14 00:23:59 massiot Exp $
+ * $Id: esd.c,v 1.5 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Samuel Hocevar <sam@zoy.org>
*
/* Get the presentation date of the next write() operation. It
* is equal to the current date + buffered samples + esd latency */
- p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency );
+ p_buffer = aout_OutputNextBuffer( p_aout, mdate() + p_sys->latency, 0 );
if ( p_buffer != NULL )
{
* oss.c : OSS /dev/dsp module for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: oss.c,v 1.9 2002/08/14 00:23:59 massiot Exp $
+ * $Id: oss.c,v 1.10 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
while ( !p_aout->b_die )
{
aout_buffer_t * p_buffer;
- mtime_t next_date = 0;
int i_tmp, i_size;
byte_t * p_bytes;
if ( p_aout->output.output.i_format != AOUT_FMT_SPDIF )
{
+ mtime_t next_date = 0;
/* Get the presentation date of the next write() operation. It
* is equal to the current date + duration of buffered samples.
* Order is important here, since GetBufInfo is believed to take
next_date = (mtime_t)GetBufInfo( p_aout ) * 1000000
/ aout_FormatToByterate( &p_aout->output.output );
next_date += mdate();
- }
- p_buffer = aout_OutputNextBuffer( p_aout, next_date );
+ p_buffer = aout_OutputNextBuffer( p_aout, next_date, 0 );
+ }
+ else
+ {
+ p_buffer = aout_OutputNextBuffer( p_aout, 0, 1 );
+ }
if ( p_buffer != NULL )
{
* sdl.c : SDL audio output plugin for vlc
*****************************************************************************
* Copyright (C) 2000-2002 VideoLAN
- * $Id: sdl.c,v 1.1 2002/08/13 11:59:36 sam Exp $
+ * $Id: sdl.c,v 1.2 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Michel Kaempf <maxx@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
{
aout_instance_t * p_aout = (aout_instance_t *)_p_aout;
/* FIXME : take into account SDL latency instead of mdate() */
- aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate() );
+ aout_buffer_t * p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 );
if ( i_len != FRAME_SIZE * sizeof(s16)
* p_aout->output.output.i_channels )
* waveout.c : Windows waveOut plugin for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: waveout.c,v 1.2 2002/08/10 18:17:06 gbazin Exp $
+ * $Id: waveout.c,v 1.3 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
aout_BufferFree( (aout_buffer_t *)p_waveheader->dwUser );
/* FIXME : take into account WaveOut latency instead of mdate() */
- p_buffer = aout_OutputNextBuffer( p_aout, mdate() );
+ p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 );
PlayWaveOut( p_aout, h_waveout, p_waveheader, p_buffer );
}
* aout.m: CoreAudio output plugin
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: aout.m,v 1.3 2002/08/12 22:48:18 massiot Exp $
+ * $Id: aout.m,v 1.4 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Colin Delacroix <colin@zoy.org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
current_date = p_sys->clock_diff
+ AudioConvertHostTimeToNanos(host_time.mHostTime) / 1000;
- p_buffer = aout_OutputNextBuffer( p_aout, current_date );
+ p_buffer = aout_OutputNextBuffer( p_aout, current_date, 0 );
/* move data into output data buffer */
if ( p_buffer != NULL )
* aout.c: Windows DirectX audio output method
*****************************************************************************
* Copyright (C) 2001 VideoLAN
- * $Id: aout.c,v 1.3 2002/08/12 09:34:15 sam Exp $
+ * $Id: aout.c,v 1.4 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Gildas Bazin <gbazin@netcourrier.com>
*
}
/* FIXME : take into account DirectSound latency instead of mdate() */
- p_buffer = aout_OutputNextBuffer( p_aout, mdate() );
+ p_buffer = aout_OutputNextBuffer( p_aout, mdate(), 0 );
/* Now do the actual memcpy into the circular buffer */
if ( l_bytes1 != p_notif->i_buffer_size )
* output.c : internal management of output streams for the audio output
*****************************************************************************
* Copyright (C) 2002 VideoLAN
- * $Id: output.c,v 1.5 2002/08/14 00:23:59 massiot Exp $
+ * $Id: output.c,v 1.6 2002/08/14 00:43:52 massiot Exp $
*
* Authors: Christophe Massiot <massiot@via.ecp.fr>
*
* do it by itself. S/PDIF outputs should always set b_can_sleek = 1.
*****************************************************************************/
aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
- mtime_t start_date /*,
- vlc_bool_t b_can_sleek */ )
+ mtime_t start_date ,
+ vlc_bool_t b_can_sleek )
{
aout_buffer_t * p_buffer;
* STORE_SYMBOLS: store known symbols into p_symbols for plugin access.
*****************************************************************************/
#define STORE_SYMBOLS( p_symbols ) \
+ (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \
(p_symbols)->__aout_NewInstance_inner = __aout_NewInstance; \
(p_symbols)->aout_DeleteInstance_inner = aout_DeleteInstance; \
(p_symbols)->aout_BufferNew_inner = aout_BufferNew; \
(p_symbols)->aout_FormatToByterate_inner = aout_FormatToByterate; \
(p_symbols)->__aout_InputNew_inner = __aout_InputNew; \
(p_symbols)->aout_InputDelete_inner = aout_InputDelete; \
- (p_symbols)->aout_OutputNextBuffer_inner = aout_OutputNextBuffer; \
(p_symbols)->__config_GetInt_inner = __config_GetInt; \
(p_symbols)->__config_PutInt_inner = __config_PutInt; \
(p_symbols)->__config_GetFloat_inner = __config_GetFloat; \