# Audio output settings
AUDIO = dsp
# Not yet supported
-#AUDIO += esd
+AUDIO += esd
# Fallback method that should always work
AUDIO += dummy
LIB += -lm
ifneq (,$(findstring x11,$(video)))
-LIB += -L/usr/X11R6/lib
-LIB += -lX11
-LIB += -lXext
+LIB += -L/usr/X11R6/lib -lX11 -lXext
endif
ifneq (,$(findstring ggi,$(video)))
LIB += -lggi
LIB += -lglide2x
endif
+ifneq (,$(findstring esd,$(audio)))
+LIB += -lesd -laudiofile
+endif
+
#
# C compiler flags: compilation
#
p_aout->p_sys_playsamples = aout_DspSysPlaySamples;
p_aout->p_sys_close = aout_DspSysClose;
}
+#endif
+#ifdef AUDIO_ESD
+ else if( !strcmp(psz_method, "esd") )
+ {
+ p_aout->p_sys_open = aout_EsdSysOpen;
+ p_aout->p_sys_reset = aout_EsdSysReset;
+ p_aout->p_sys_setformat = aout_EsdSysSetFormat;
+ p_aout->p_sys_setchannels = aout_EsdSysSetChannels;
+ p_aout->p_sys_setrate = aout_EsdSysSetRate;
+ p_aout->p_sys_getbufinfo = aout_EsdSysGetBufInfo;
+ p_aout->p_sys_playsamples = aout_EsdSysPlaySamples;
+ p_aout->p_sys_close = aout_EsdSysClose;
+ }
#endif
else
{
/* Before launching the thread, we try to predict the date of the first
* audio unit in the first output buffer */
- p_aout->date = mdate();
+ p_aout->date = mdate() - 1000000;
/* Launch the thread */
if ( vlc_thread_create( &p_aout->thread_id, "audio output", (vlc_thread_func_t)aout_thread, p_aout ) )
}
l_bytes = p_aout->p_sys_getbufinfo( p_aout, l_buffer_limit );
- p_aout->date = mdate() + ((((mtime_t)(l_bytes / 4)) * 1000000) / ((mtime_t)p_aout->l_rate)); /* sizeof(s16) << (p_aout->b_stereo) == 4 */
+ p_aout->date = -1000000 + mdate() + ((((mtime_t)(l_bytes / 4)) * 1000000) / ((mtime_t)p_aout->l_rate)); /* sizeof(s16) << (p_aout->b_stereo) == 4 */
p_aout->p_sys_playsamples( p_aout, (byte_t *)p_aout->buffer, l_buffer_limit * sizeof(s16) );
if ( l_bytes > (l_buffer_limit * sizeof(s16)) )
{
void aout_DspSysPlaySamples ( aout_thread_t *p_aout, byte_t *buffer, int i_size );
void aout_DspSysClose ( aout_thread_t *p_aout );
#endif
+#ifdef AUDIO_ESD
+int aout_EsdSysOpen ( aout_thread_t *p_aout );
+int aout_EsdSysReset ( aout_thread_t *p_aout );
+int aout_EsdSysSetFormat ( aout_thread_t *p_aout );
+int aout_EsdSysSetChannels ( aout_thread_t *p_aout );
+int aout_EsdSysSetRate ( aout_thread_t *p_aout );
+long aout_EsdSysGetBufInfo ( aout_thread_t *p_aout, long l_buffer_info );
+void aout_EsdSysPlaySamples ( aout_thread_t *p_aout, byte_t *buffer, int i_size );
+void aout_EsdSysClose ( aout_thread_t *p_aout );
+#endif