diff options
author | Max Kellermann <max@duempel.org> | 2014-12-29 22:42:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-29 22:42:52 +0100 |
commit | 99e6409a67de5f4af181ac11b2b9fd9b4515e3fa (patch) | |
tree | 6778503679c780c82fe3afc56a345588ef32e829 /src/mixer/plugins/PulseMixerPlugin.cxx | |
parent | 6a0a5f9693a69d2b8453d77155d2b238decf964d (diff) | |
download | mpd-99e6409a67de5f4af181ac11b2b9fd9b4515e3fa.tar.gz mpd-99e6409a67de5f4af181ac11b2b9fd9b4515e3fa.tar.xz mpd-99e6409a67de5f4af181ac11b2b9fd9b4515e3fa.zip |
{mixer,output}/pulse: move code to LogPulseError()
Diffstat (limited to 'src/mixer/plugins/PulseMixerPlugin.cxx')
-rw-r--r-- | src/mixer/plugins/PulseMixerPlugin.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
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 <pulse/introspect.h> #include <pulse/stream.h> #include <pulse/subscribe.h> -#include <pulse/error.h> #include <assert.h> @@ -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; } |