diff options
author | Max Kellermann <max@duempel.org> | 2013-12-24 14:44:08 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-12-24 14:44:08 +0100 |
commit | 1ad52f131c7adf3396ea03d8da0da807da222bba (patch) | |
tree | 7556fa5d25352a5166342cbd582e62f473644123 /test/software_volume.cxx | |
parent | 8064bbbc3f3d3bac50a9cd972106479fd32917cc (diff) | |
download | mpd-1ad52f131c7adf3396ea03d8da0da807da222bba.tar.gz mpd-1ad52f131c7adf3396ea03d8da0da807da222bba.tar.xz mpd-1ad52f131c7adf3396ea03d8da0da807da222bba.zip |
test/*: use fprintf(stderr,...) and Log() instead of g_printerr()
Avoid GLib.
Diffstat (limited to 'test/software_volume.cxx')
-rw-r--r-- | test/software_volume.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/test/software_volume.cxx b/test/software_volume.cxx index ae2d53a08..1a336f2df 100644 --- a/test/software_volume.cxx +++ b/test/software_volume.cxx @@ -30,8 +30,7 @@ #include "util/ConstBuffer.hxx" #include "util/Error.hxx" #include "stdbin.h" - -#include <glib.h> +#include "Log.hxx" #include <stddef.h> #include <stdlib.h> @@ -43,17 +42,16 @@ int main(int argc, char **argv) ssize_t nbytes; if (argc > 2) { - g_printerr("Usage: software_volume [FORMAT] <IN >OUT\n"); - return 1; + fprintf(stderr, "Usage: software_volume [FORMAT] <IN >OUT\n"); + return EXIT_FAILURE; } Error error; AudioFormat audio_format(48000, SampleFormat::S16, 2); if (argc > 1) { if (!audio_format_parse(audio_format, argv[1], false, error)) { - g_printerr("Failed to parse audio format: %s\n", - error.GetMessage()); - return 1; + LogError(error, "Failed to parse audio format"); + return EXIT_FAILURE; } } |