aboutsummaryrefslogtreecommitdiffstats
path: root/src/pcm_utils.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-29 17:28:49 +0100
committerMax Kellermann <max@duempel.org>2008-12-29 17:28:49 +0100
commite0fe4eb722ac3115ca74080cf100641a91d13236 (patch)
tree2e46449231d9dfc7da66e427e23cd470855c0e44 /src/pcm_utils.c
parentf4ce43b958719604364c5a840a03781e9ea0ca72 (diff)
downloadmpd-e0fe4eb722ac3115ca74080cf100641a91d13236.tar.gz
mpd-e0fe4eb722ac3115ca74080cf100641a91d13236.tar.xz
mpd-e0fe4eb722ac3115ca74080cf100641a91d13236.zip
pcm: use GLib logging
Diffstat (limited to 'src/pcm_utils.c')
-rw-r--r--src/pcm_utils.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/pcm_utils.c b/src/pcm_utils.c
index f73df8aef..46c5f2884 100644
--- a/src/pcm_utils.c
+++ b/src/pcm_utils.c
@@ -18,7 +18,6 @@
#include "pcm_utils.h"
#include "pcm_channels.h"
-#include "log.h"
#include "utils.h"
#include "conf.h"
#include "audio_format.h"
@@ -28,6 +27,9 @@
#include <math.h>
#include <glib.h>
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "pcm"
+
static inline int
pcm_dither(void)
{
@@ -118,8 +120,8 @@ void pcm_volume(char *buffer, int bufferSize,
break;
default:
- FATAL("%u bits not supported by pcm_volume!\n",
- format->bits);
+ g_error("%u bits not supported by pcm_volume!\n",
+ format->bits);
}
}
@@ -193,7 +195,7 @@ static void pcm_add(char *buffer1, const char *buffer2, size_t size,
break;
default:
- FATAL("%u bits not supported by pcm_add!\n", format->bits);
+ g_error("%u bits not supported by pcm_add!\n", format->bits);
}
}
@@ -278,7 +280,7 @@ pcm_convert_to_16(struct pcm_convert_state *convert,
return buf;
}
- ERROR("only 8 or 16 bits are supported for conversion!\n");
+ g_warning("only 8 or 16 bits are supported for conversion!\n");
return NULL;
}
@@ -340,7 +342,7 @@ pcm_convert_to_24(uint8_t bits, const void *src,
return src;
}
- ERROR("only 8 or 24 bits are supported for conversion!\n");
+ g_warning("only 8 or 24 bits are supported for conversion!\n");
return NULL;
}
@@ -442,7 +444,7 @@ size_t pcm_convert(const struct audio_format *inFormat,
convState);
default:
- FATAL("cannot convert to %u bit\n", outFormat->bits);
+ g_error("cannot convert to %u bit\n", outFormat->bits);
}
}