summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-07 22:45:08 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-07 22:45:08 +0000
commit4af16e43cb37eb4a0140f7105490e640512e7c13 (patch)
treec2c3b06dba516bc5ce5909059328b69d1e4ba731
parent7261494b840b0b9c0ae7bcd6422098e2d795c6c9 (diff)
minor cleanups
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@659 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r--src/modules/module-alsa-sink.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/module-alsa-sink.c b/src/modules/module-alsa-sink.c
index 2e9459e6..f930e615 100644
--- a/src/modules/module-alsa-sink.c
+++ b/src/modules/module-alsa-sink.c
@@ -124,7 +124,7 @@ static void do_write(struct userdata *u) {
continue;
}
- pa_log(__FILE__": snd_pcm_writei() failed");
+ pa_log(__FILE__": snd_pcm_writei() failed: %s", snd_strerror(frames));
return;
}
@@ -176,17 +176,19 @@ static pa_usec_t sink_get_latency_cb(pa_sink *s) {
pa_usec_t r = 0;
struct userdata *u = s->userdata;
snd_pcm_sframes_t frames;
+ int err;
+
assert(s && u && u->sink);
- if (snd_pcm_delay(u->pcm_handle, &frames) < 0) {
- pa_log(__FILE__": failed to get delay");
+ if ((err = snd_pcm_delay(u->pcm_handle, &frames)) < 0) {
+ pa_log(__FILE__": failed to get delay: %s", snd_strerror(err));
s->get_latency = NULL;
return 0;
}
if (frames < 0)
frames = 0;
-
+
r += pa_bytes_to_usec(frames * u->frame_size, &s->sample_spec);
if (u->memchunk.memblock)