From 19bd9148c5d16a8363065ca128e06037780337ab Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 4 Jan 2007 14:06:24 +0000 Subject: [PATCH] Fix error messages for failure connecting streams. git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1419 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/utils/padsp.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/padsp.c b/src/utils/padsp.c index 679a5d0..c602541 100644 --- a/src/utils/padsp.c +++ b/src/utils/padsp.c @@ -909,7 +909,15 @@ static void stream_state_cb(pa_stream *s, void * userdata) { break; case PA_STREAM_FAILED: - debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_connect_playback() failed: %s\n", pa_strerror(pa_context_errno(i->context))); + if (s == i->play_stream) { + debug(DEBUG_LEVEL_NORMAL, + __FILE__": pa_stream_connect_playback() failed: %s\n", + pa_strerror(pa_context_errno(i->context))); + } else if (s == i->rec_stream) { + debug(DEBUG_LEVEL_NORMAL, + __FILE__": pa_stream_connect_record() failed: %s\n", + pa_strerror(pa_context_errno(i->context))); + } fd_info_shutdown(i); break; @@ -981,7 +989,7 @@ static int create_record_stream(fd_info *i) { attr.fragsize = i->fragment_size; if (pa_stream_connect_record(i->rec_stream, NULL, &attr, PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_AUTO_TIMING_UPDATE) < 0) { - debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_connect_playback() failed: %s\n", pa_strerror(pa_context_errno(i->context))); + debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_connect_record() failed: %s\n", pa_strerror(pa_context_errno(i->context))); goto fail; } -- 2.7.4