From 99e6409a67de5f4af181ac11b2b9fd9b4515e3fa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Dec 2014 22:42:52 +0100 Subject: {mixer,output}/pulse: move code to LogPulseError() --- src/mixer/plugins/PulseMixerPlugin.cxx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/mixer/plugins') diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx index d948c4a48..1c47f5a5a 100644 --- a/src/mixer/plugins/PulseMixerPlugin.cxx +++ b/src/mixer/plugins/PulseMixerPlugin.cxx @@ -20,6 +20,7 @@ #include "config.h" #include "PulseMixerPlugin.hxx" #include "lib/pulse/Domain.hxx" +#include "lib/pulse/LogError.hxx" #include "mixer/MixerInternal.hxx" #include "mixer/Listener.hxx" #include "output/plugins/PulseOutputPlugin.hxx" @@ -30,7 +31,6 @@ #include #include #include -#include #include @@ -118,9 +118,8 @@ PulseMixer::Update(pa_context *context, pa_stream *stream) pa_stream_get_index(stream), pulse_mixer_volume_cb, this); if (o == nullptr) { - FormatError(pulse_domain, - "pa_context_get_sink_input_info() failed: %s", - pa_strerror(pa_context_errno(context))); + LogPulseError(context, + "pa_context_get_sink_input_info() failed"); Offline(); return; } @@ -140,9 +139,8 @@ pulse_mixer_on_connect(gcc_unused PulseMixer &pm, (pa_subscription_mask_t)PA_SUBSCRIPTION_MASK_SINK_INPUT, nullptr, nullptr); if (o == nullptr) { - FormatError(pulse_domain, - "pa_context_subscribe() failed: %s", - pa_strerror(pa_context_errno(context))); + LogPulseError(context, + "pa_context_subscribe() failed"); return; } -- cgit v1.2.3