From 99e6409a67de5f4af181ac11b2b9fd9b4515e3fa Mon Sep 17 00:00:00 2001
From: Max Kellermann <max@duempel.org>
Date: Mon, 29 Dec 2014 22:42:52 +0100
Subject: {mixer,output}/pulse: move code to LogPulseError()

---
 src/output/plugins/PulseOutputPlugin.cxx | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'src/output')

diff --git a/src/output/plugins/PulseOutputPlugin.cxx b/src/output/plugins/PulseOutputPlugin.cxx
index 916366bf7..3e50eac52 100644
--- a/src/output/plugins/PulseOutputPlugin.cxx
+++ b/src/output/plugins/PulseOutputPlugin.cxx
@@ -21,6 +21,7 @@
 #include "PulseOutputPlugin.hxx"
 #include "lib/pulse/Domain.hxx"
 #include "lib/pulse/Error.hxx"
+#include "lib/pulse/LogError.hxx"
 #include "../OutputAPI.hxx"
 #include "mixer/MixerList.hxx"
 #include "mixer/plugins/PulseMixerPlugin.hxx"
@@ -618,9 +619,8 @@ pulse_output_close(AudioOutput *ao)
 		o = pa_stream_drain(po->stream,
 				    pulse_output_stream_success_cb, po);
 		if (o == nullptr) {
-			FormatWarning(pulse_domain,
-				      "pa_stream_drain() has failed: %s",
-				      pa_strerror(pa_context_errno(po->context)));
+			LogPulseError(po->context,
+				      "pa_stream_drain() has failed");
 		} else
 			pulse_wait_for_operation(po->mainloop, o);
 	}
@@ -797,9 +797,7 @@ pulse_output_cancel(AudioOutput *ao)
 
 	o = pa_stream_flush(po->stream, pulse_output_stream_success_cb, po);
 	if (o == nullptr) {
-		FormatWarning(pulse_domain,
-			      "pa_stream_flush() has failed: %s",
-			      pa_strerror(pa_context_errno(po->context)));
+		LogPulseError(po->context, "pa_stream_flush() has failed");
 		pa_threaded_mainloop_unlock(po->mainloop);
 		return;
 	}
-- 
cgit v1.2.3