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 | 20 | ||||
| -rw-r--r-- | src/audio_out/audio_directx2_out.c | 5 | ||||
| -rw-r--r--[-rwxr-xr-x] | src/audio_out/audio_directx_out.c | 0 | ||||
| -rw-r--r-- | src/audio_out/audio_sun_out.c | 12 |
5 files changed, 14 insertions, 35 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..6ad78da2a 100644 --- a/src/audio_out/audio_alsa_out.c +++ b/src/audio_out/audio_alsa_out.c @@ -265,10 +265,7 @@ static long ao_alsa_get_volume_from_percent(int val, long min, long max) { * Error callback, we need to control this, * error message should be printed only in DEBUG mode. */ -static void -#ifdef __GNUC__ - __attribute__((format (printf, 5, 6))) -#endif +static void XINE_FORMAT_PRINTF(5, 6) error_callback(const char *file, int line, const char *function, int err, const char *fmt, ...) { #ifdef DEBUG @@ -663,15 +660,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 +668,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 diff --git a/src/audio_out/audio_directx2_out.c b/src/audio_out/audio_directx2_out.c index aff4412ec..7161f192d 100644 --- a/src/audio_out/audio_directx2_out.c +++ b/src/audio_out/audio_directx2_out.c @@ -151,10 +151,7 @@ static int buffer_ready(dx2_driver_t *this); /* popup a dialog with error */ -static void -#ifdef __GNUC__ - __attribute__((format (printf, 1, 2))) -#endif +static void XINE_FORMAT_PRINTF(1, 2) error_message(const char *fmt, ...) { char message[256]; va_list ap; diff --git a/src/audio_out/audio_directx_out.c b/src/audio_out/audio_directx_out.c index d2147ac52..d2147ac52 100755..100644 --- a/src/audio_out/audio_directx_out.c +++ b/src/audio_out/audio_directx_out.c diff --git a/src/audio_out/audio_sun_out.c b/src/audio_out/audio_sun_out.c index 93361d2f3..5923eb658 100644 --- a/src/audio_out/audio_sun_out.c +++ b/src/audio_out/audio_sun_out.c @@ -126,10 +126,10 @@ typedef struct sun_driver_s { #ifdef __svr4__ #if SW_SAMPLE_COUNT struct timeval tv0; - uint_t sample0; + size_t sample0; #endif - uint_t last_samplecnt; + size_t last_samplecnt; #endif } sun_driver_t; @@ -604,8 +604,8 @@ static int ao_sun_delay(ao_driver_t *this_gen) /* compute "current sample" based on real time */ { struct timeval tv1; - uint_t cur_sample; - uint_t msec; + size_t cur_sample; + size_t msec; gettimeofday(&tv1, NULL); @@ -807,7 +807,7 @@ static int ao_sun_get_property (ao_driver_t *this_gen, int property) { this->mixer_volume = info.play.gain * 100 / AUDIO_MAX_GAIN; } return this->mixer_volume; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: if (ioctl(this->audio_fd, AUDIO_GETINFO, &info) < 0) return 0; @@ -836,7 +836,7 @@ static int ao_sun_set_property (ao_driver_t *this_gen, int property, int value) if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) return ~value; return value; -#if !defined(__NetBSD__) /* audio_info.output_muted is missing on NetBSD */ +#ifdef HAVE_AUDIO_INFO_T_OUTPUT_MUTED case AO_PROP_MUTE_VOL: info.output_muted = value != 0; if (ioctl(this->audio_fd, AUDIO_SETINFO, &info) < 0) |
