aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-27 22:31:24 +0200
committerMax Kellermann <max@duempel.org>2013-10-02 08:57:55 +0200
commit060814daa83f6a94f5934464ae42a406c5c7e947 (patch)
treef636ec6cdbb8e52fda6db987d2a28fc73c7b94b4 /src/pcm
parentc53492a76a8a05825e1c7f699c05645eee891199 (diff)
downloadmpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.gz
mpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.xz
mpd-060814daa83f6a94f5934464ae42a406c5c7e947.zip
Log: new logging library API
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
Diffstat (limited to '')
-rw-r--r--src/pcm/PcmConvert.cxx3
-rw-r--r--src/pcm/PcmResampleLibsamplerate.cxx14
-rw-r--r--src/pcm/PcmVolume.cxx3
3 files changed, 7 insertions, 13 deletions
diff --git a/src/pcm/PcmConvert.cxx b/src/pcm/PcmConvert.cxx
index 38672810e..4260ccb0f 100644
--- a/src/pcm/PcmConvert.cxx
+++ b/src/pcm/PcmConvert.cxx
@@ -31,9 +31,6 @@
#include <assert.h>
#include <math.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "pcm"
-
const Domain pcm_convert_domain("pcm_convert");
PcmConvert::PcmConvert()
diff --git a/src/pcm/PcmResampleLibsamplerate.cxx b/src/pcm/PcmResampleLibsamplerate.cxx
index 1ab9b1953..2ffe4b8c4 100644
--- a/src/pcm/PcmResampleLibsamplerate.cxx
+++ b/src/pcm/PcmResampleLibsamplerate.cxx
@@ -21,6 +21,7 @@
#include "PcmResampleInternal.hxx"
#include "util/Error.hxx"
#include "util/Domain.hxx"
+#include "Log.hxx"
#include <glib.h>
@@ -28,9 +29,6 @@
#include <stdlib.h>
#include <string.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "pcm"
-
static int lsr_converter = SRC_SINC_FASTEST;
static constexpr Domain libsamplerate_domain("libsamplerate");
@@ -74,8 +72,9 @@ pcm_resample_lsr_global_init(const char *converter, Error &error)
return false;
}
- g_debug("libsamplerate converter '%s'",
- src_get_name(lsr_converter));
+ FormatDebug(libsamplerate_domain,
+ "libsamplerate converter '%s'",
+ src_get_name(lsr_converter));
return true;
}
@@ -133,8 +132,9 @@ pcm_resample_set(PcmResampler *state,
SRC_DATA *data = &state->data;
data->src_ratio = (double)dest_rate / (double)src_rate;
- g_debug("setting samplerate conversion ratio to %.2lf",
- data->src_ratio);
+ FormatDebug(libsamplerate_domain,
+ "setting samplerate conversion ratio to %.2lf",
+ data->src_ratio);
src_set_ratio(state->state, data->src_ratio);
return true;
diff --git a/src/pcm/PcmVolume.cxx b/src/pcm/PcmVolume.cxx
index ff505e29d..05ab73c68 100644
--- a/src/pcm/PcmVolume.cxx
+++ b/src/pcm/PcmVolume.cxx
@@ -27,9 +27,6 @@
#include <stdint.h>
#include <string.h>
-#undef G_LOG_DOMAIN
-#define G_LOG_DOMAIN "pcm_volume"
-
static void
pcm_volume_change_8(int8_t *buffer, const int8_t *end, int volume)
{