From a06af61b6b6e4d56ba3e5dd84536af8815220f84 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Aug 2008 00:05:47 +0200 Subject: use SNDERR instead of fprintf to print error messages We shouldn't spam on stderr unconditionally, so let's use ALSA subsystem for printing errors. --- pulse/pcm_pulse.c | 5 ++--- pulse/pulse.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'pulse') diff --git a/pulse/pcm_pulse.c b/pulse/pcm_pulse.c index 10d7aa7..7201776 100644 --- a/pulse/pcm_pulse.c +++ b/pulse/pcm_pulse.c @@ -553,8 +553,7 @@ static int pulse_prepare(snd_pcm_ioplug_t * io) err = pulse_wait_stream_state(pcm->p, pcm->stream, PA_STREAM_READY); if (err < 0) { - fprintf(stderr, - "*** PULSEAUDIO: Unable to create stream.\n"); + SNDERR("PulseAudio: Unable to create stream: %s\n", pa_strerror(pa_context_errno(pcm->p->context))); pa_stream_unref(pcm->stream); pcm->stream = NULL; goto finish; @@ -621,7 +620,7 @@ static int pulse_hw_params(snd_pcm_ioplug_t * io, pcm->ss.format = PA_SAMPLE_FLOAT32BE; break; default: - fprintf(stderr, "*** PULSEAUDIO: unsupported format %s\n", + SNDERR("PulseAudio: Unsupported format %s\n", snd_pcm_format_name(io->format)); err = -EINVAL; goto finish; diff --git a/pulse/pulse.c b/pulse/pulse.c index e738d07..8a60507 100644 --- a/pulse/pulse.c +++ b/pulse/pulse.c @@ -211,7 +211,7 @@ int pulse_connect(snd_pulse_t * p, const char *server) return 0; error: - fprintf(stderr, "*** PULSEAUDIO: Unable to connect: %s\n", + SNDERR("PulseAudio: Unable to connect: %s\n", pa_strerror(pa_context_errno(p->context))); pa_threaded_mainloop_unlock(p->mainloop); -- cgit