#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_input.h>
-#include <vlc_vout.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
-#include <sys/soundcard.h>
+#ifdef HAVE_SYS_SOUNDCARD_H
+# include <sys/soundcard.h>
+#endif
+#ifdef HAVE_SOUNDCARD_H
+# include <soundcard.h>
+#endif
#include <poll.h>
set_callbacks( DemuxOpen, DemuxClose )
add_bool( CFG_PREFIX "stereo", true, NULL, STEREO_TEXT, STEREO_LONGTEXT,
- true );
+ true )
add_integer( CFG_PREFIX "samplerate", 48000, NULL, SAMPLERATE_TEXT,
- SAMPLERATE_LONGTEXT, true );
+ SAMPLERATE_LONGTEXT, true )
add_integer( CFG_PREFIX "caching", DEFAULT_PTS_DELAY / 1000, NULL,
- CACHING_TEXT, CACHING_LONGTEXT, true );
+ CACHING_TEXT, CACHING_LONGTEXT, true )
vlc_module_end ()
/*****************************************************************************
}
/* Wait for data */
- if( poll( &fd, 1, 500 ) ) /* Timeout after 0.5 seconds since I don't know if pf_demux can be blocking. */
+ if( poll( &fd, 1, 10 ) ) /* Timeout after 0.01 seconds. Bigger delays are an issue when used with/as an input-slave since all the inputs run in the same thread. */
{
if( fd.revents & (POLLIN|POLLPRI) )
{
p_sys->i_sample_rate );
es_format_t fmt;
- es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC('a','r','a','w') );
+ es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_S16L );
fmt.audio.i_channels = p_sys->b_stereo ? 2 : 1;
fmt.audio.i_rate = p_sys->i_sample_rate;