diff options
Diffstat (limited to 'src/audio_out')
-rw-r--r-- | src/audio_out/Makefile.am | 12 | ||||
-rw-r--r-- | src/audio_out/audio_alsa_out.c | 15 |
2 files changed, 6 insertions, 21 deletions
diff --git a/src/audio_out/Makefile.am b/src/audio_out/Makefile.am index d52f700f3..20a4e708b 100644 --- a/src/audio_out/Makefile.am +++ b/src/audio_out/Makefile.am @@ -4,8 +4,6 @@ AM_CPPFLAGS = -DXINE_COMPILE EXTRA_DIST = audio_irixal_out.c -libdir = $(XINE_PLUGINDIR) - if HAVE_OSS oss_module = xineplug_ao_out_oss.la endif @@ -57,7 +55,7 @@ endif # all xine audio out plugins should be named like the # scheme "xineplug_ao_out_" # -lib_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ +xineplug_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ $(oss_module) \ $(alsa_module) \ $(sun_module) \ @@ -70,14 +68,6 @@ lib_LTLIBRARIES = xineplug_ao_out_none.la xineplug_ao_out_file.la \ $(fusionsound_module) \ $(jack_module) -#lib_LTLIBRARIES = \ -# $(alsa_module) \ -# $(arts_module) \ -# $(esd_module) \ -# $(irixal_module) \ -# $(oss_module) \ -# $(sun_module) - xineplug_ao_out_none_la_SOURCES = audio_none_out.c xineplug_ao_out_none_la_LIBADD = $(XINE_LIB) xineplug_ao_out_none_la_CFLAGS = $(VISIBILITY_FLAG) diff --git a/src/audio_out/audio_alsa_out.c b/src/audio_out/audio_alsa_out.c index 3651d21da..f176b7594 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -663,15 +663,7 @@ static int ao_alsa_delay (ao_driver_t *this_gen) { struct timeval now; printf("audio_alsa_out:delay:ENTERED\n"); #endif - err=snd_pcm_delay( this->audio_fd, &delay ); - - int state = snd_pcm_state(this->audio_fd); - - /* check for idle states, which need to be handled as delay=0 */ - if(state == SND_PCM_STATE_PREPARED || state == SND_PCM_STATE_PAUSED || - state == SND_PCM_STATE_OPEN || SND_PCM_STATE_XRUN) { - return 0; - } + err = snd_pcm_delay( this->audio_fd, &delay ); #ifdef LOG_DEBUG printf("audio_alsa_out:delay:delay all=%ld err=%d\n",delay, err); @@ -679,8 +671,11 @@ static int ao_alsa_delay (ao_driver_t *this_gen) { printf("audio_alsa_out:delay: Time = %ld.%ld\n", now.tv_sec, now.tv_usec); printf("audio_alsa_out:delay:FINISHED\n"); #endif - return delay; + if (err || (delay < 0)) + delay = 0; + + return delay; } #if 0 |