diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-08-22 00:05:47 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-09-03 20:25:35 +0200 |
commit | a06af61b6b6e4d56ba3e5dd84536af8815220f84 (patch) | |
tree | cc3dee0c47955db8887ea7b1ff2b1565cfb6c592 /pulse | |
parent | 7c1f52d2c510bd5cdf75f0acd15604f645ea5b41 (diff) |
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.
Diffstat (limited to 'pulse')
-rw-r--r-- | pulse/pcm_pulse.c | 5 | ||||
-rw-r--r-- | pulse/pulse.c | 2 |
2 files changed, 3 insertions, 4 deletions
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); |