aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-12-29 22:25:14 +0100
committerMax Kellermann <max@duempel.org>2014-12-29 22:25:14 +0100
commitfe9db8b369cdb9e62396b6f92d48b03f4c5ad703 (patch)
tree4ca3fa1bf18575d9227e2bee4352cd4e63b7e14f /src/mixer
parentca035d0e8dec5e6f370885a8e21ac3c7998d8523 (diff)
downloadmpd-fe9db8b369cdb9e62396b6f92d48b03f4c5ad703.tar.gz
mpd-fe9db8b369cdb9e62396b6f92d48b03f4c5ad703.tar.xz
mpd-fe9db8b369cdb9e62396b6f92d48b03f4c5ad703.zip
{mixer,output}/pulse: use a common Domain instance
Diffstat (limited to 'src/mixer')
-rw-r--r--src/mixer/plugins/PulseMixerPlugin.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/mixer/plugins/PulseMixerPlugin.cxx b/src/mixer/plugins/PulseMixerPlugin.cxx
index 9e3eef9d8..d948c4a48 100644
--- a/src/mixer/plugins/PulseMixerPlugin.cxx
+++ b/src/mixer/plugins/PulseMixerPlugin.cxx
@@ -19,11 +19,11 @@
#include "config.h"
#include "PulseMixerPlugin.hxx"
+#include "lib/pulse/Domain.hxx"
#include "mixer/MixerInternal.hxx"
#include "mixer/Listener.hxx"
#include "output/plugins/PulseOutputPlugin.hxx"
#include "util/Error.hxx"
-#include "util/Domain.hxx"
#include "Log.hxx"
#include <pulse/context.h>
@@ -66,8 +66,6 @@ public:
bool SetVolume(unsigned volume, Error &error) override;
};
-static constexpr Domain pulse_mixer_domain("pulse_mixer");
-
void
PulseMixer::Offline()
{
@@ -120,7 +118,7 @@ PulseMixer::Update(pa_context *context, pa_stream *stream)
pa_stream_get_index(stream),
pulse_mixer_volume_cb, this);
if (o == nullptr) {
- FormatError(pulse_mixer_domain,
+ FormatError(pulse_domain,
"pa_context_get_sink_input_info() failed: %s",
pa_strerror(pa_context_errno(context)));
Offline();
@@ -142,7 +140,7 @@ pulse_mixer_on_connect(gcc_unused PulseMixer &pm,
(pa_subscription_mask_t)PA_SUBSCRIPTION_MASK_SINK_INPUT,
nullptr, nullptr);
if (o == nullptr) {
- FormatError(pulse_mixer_domain,
+ FormatError(pulse_domain,
"pa_context_subscribe() failed: %s",
pa_strerror(pa_context_errno(context)));
return;
@@ -212,7 +210,7 @@ PulseMixer::SetVolume(unsigned new_volume, Error &error)
if (!online) {
pulse_output_unlock(output);
- error.Set(pulse_mixer_domain, "disconnected");
+ error.Set(pulse_domain, "disconnected");
return false;
}