From: Lennart Poettering Date: Mon, 23 Feb 2009 21:56:34 +0000 (+0100) Subject: use pa_alsa_safe_delay() where appropriate X-Git-Tag: v0.9.15-test3~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=023ba8975be6e3a592ed0e7cd5723b8152dec4a6;p=platform%2Fupstream%2Fpulseaudio.git use pa_alsa_safe_delay() where appropriate --- diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index 6157549..d4a54fe 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -522,7 +522,7 @@ static void update_smoother(struct userdata *u) { /* Let's update the time smoother */ - if (PA_UNLIKELY((err = snd_pcm_delay(u->pcm_handle, &delay)) < 0)) { + if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->sink->sample_spec)) < 0)) { pa_log_warn("Failed to query DSP status data: %s", snd_strerror(err)); return; } diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index b0b9d9f..f2dad4c 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -492,7 +492,7 @@ static void update_smoother(struct userdata *u) { /* Let's update the time smoother */ - if (PA_UNLIKELY((err = snd_pcm_delay(u->pcm_handle, &delay)) < 0)) { + if (PA_UNLIKELY((err = pa_alsa_safe_delay(u->pcm_handle, &delay, u->hwbuf_size, &u->source->sample_spec)) < 0)) { pa_log_warn("Failed to get delay: %s", snd_strerror(err)); return; }