Log: new logging library API

Prepare to migrate away from GLib.  Currently, we're still using GLib
as a backend.
This commit is contained in:
Max Kellermann
2013-09-27 22:31:24 +02:00
parent c53492a76a
commit 060814daa8
162 changed files with 1992 additions and 1280 deletions

View File

@@ -25,15 +25,13 @@
#include "util/Domain.hxx"
#include "thread/Mutex.hxx"
#include "thread/Cond.hxx"
#include "Log.hxx"
#include <glib.h>
#include <CoreAudio/AudioHardware.h>
#include <AudioUnit/AudioUnit.h>
#include <CoreServices/CoreServices.h>
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "osx"
struct OSXOutput {
struct audio_output base;
@@ -156,15 +154,17 @@ osx_output_set_device(OSXOutput *oo, Error &error)
goto done;
}
if (strcmp(oo->device_name, name) == 0) {
g_debug("found matching device: ID=%u, name=%s",
(unsigned int) deviceids[i], name);
FormatDebug(osx_output_domain,
"found matching device: ID=%u, name=%s",
(unsigned)deviceids[i], name);
break;
}
}
if (i == numdevices) {
g_warning("Found no audio device with name '%s' "
"(will use default audio device)",
oo->device_name);
FormatWarning(osx_output_domain,
"Found no audio device with name '%s' "
"(will use default audio device)",
oo->device_name);
goto done;
}
@@ -181,8 +181,10 @@ osx_output_set_device(OSXOutput *oo, Error &error)
ret = false;
goto done;
}
g_debug("set OS X audio output device ID=%u, name=%s",
(unsigned int) deviceids[i], name);
FormatDebug(osx_output_domain,
"set OS X audio output device ID=%u, name=%s",
(unsigned)deviceids[i], name);
done:
delete[] deviceids;