util/Error: new error passing library

Replaces GLib's GError.
This commit is contained in:
Max Kellermann
2013-08-10 18:02:44 +02:00
parent c9fcc7f148
commit 29030b54c9
256 changed files with 3269 additions and 3371 deletions

View File

@@ -22,6 +22,7 @@
#include "TagHandler.hxx"
#include "DecoderAPI.hxx"
#include "CheckAudioFormat.hxx"
#include "util/Error.hxx"
#include <adplug/adplug.h>
#include <adplug/emuopl.h>
@@ -38,12 +39,11 @@ static unsigned sample_rate;
static bool
adplug_init(const config_param &param)
{
GError *error = NULL;
Error error;
sample_rate = param.GetBlockValue("sample_rate", 48000u);
if (!audio_check_sample_rate(sample_rate, &error)) {
g_warning("%s\n", error->message);
g_error_free(error);
if (!audio_check_sample_rate(sample_rate, error)) {
g_warning("%s", error.GetMessage());
return false;
}